English Scripting Questions

2,429 replies
Goto Page
To the start Previous 1 2 ... 77 78 79 ... 121 122 Next To the start
05.11.09 08:54:44 am
Up
JadeStone
User
Offline Off
How do i make it so a script checks if somthing is dead or not?
05.11.09 05:05:31 pm
Up
Vibhor
User
Offline Off
Checks?
theres an even on:kill
My avatar describes my personality the best....Douchebag who have to save the princess without speaking anything
06.11.09 12:54:40 am
Up
JadeStone
User
Offline Off
i need on impact to check if the enemy is dead or not i want it to do somthing if its dead.
06.11.09 02:54:53 am
Up
Vibhor
User
Offline Off
JadeStone has written:
i need on impact to check if the enemy is dead or not i want it to do somthing if its dead.


Event will be best option
on:kill
msg shutdafukup
or something like that
dont forget to put brackets and stuff
My avatar describes my personality the best....Douchebag who have to save the princess without speaking anything
06.11.09 04:28:34 am
Up
Bloodshot
User
Offline Off
Code:
1
2
3
4
5
6
7
8
on:impact{
     $tmp1=impact_class;
     $tmp2=impact_id;
     if (lives ("$tmp1", $tmp2)==0){
          //What you want to happen
     }
     freevar $tmp1,$tmp2;
}


This should work, but I'm not sure as I haven't been scripting in so long...
It is better to fail and then succeed than to succeed in the first place IMG:http://i420.photobucket.com/albums/pp281/L31ch3/Userbars/Strandedgamerub.png
06.11.09 06:31:08 am
Up
JadeStone
User
Offline Off
dident work
06.11.09 07:25:17 am
Up
Vibhor
User
Offline Off
Tell us the whole idea
Ill try to do what i can
My avatar describes my personality the best....Douchebag who have to save the princess without speaking anything
06.11.09 08:40:20 am
Up
JadeStone
User
Offline Off
If the enemy is dead when you hit him it does somthing but if its alive it doesnt.
06.11.09 09:08:06 am
Up
Vibhor
User
Offline Off
JadeStone has written:
If the enemy is dead when you hit him it does somthing but if its alive it doesnt.


Its fun
it would go like this
on:kill
set $var to 1
and after that
on:hit
if $var==1
then do something
My avatar describes my personality the best....Douchebag who have to save the princess without speaking anything
06.11.09 04:21:18 pm
Up
dragoana
User
Offline Off
check if it is alive when you hit it:
Code:
1
2
3
4
5
on:hit {
     if(lives("self")==0) { 
          msg "dead"; 
     }
}
IMG:http://38.de/18r
Schnapsidee @dragoana. S2 Extension Mod IMG:http://38.de/18s
06.11.09 09:36:08 pm
Up
Bloodshot
User
Offline Off
I thought you were using this script for a projectile. If it is for the lion than Schnapsidee's script will work.
It is better to fail and then succeed than to succeed in the first place IMG:http://i420.photobucket.com/albums/pp281/L31ch3/Userbars/Strandedgamerub.png
07.11.09 10:21:22 am
Up
JadeStone
User
Offline Off
still doesnt work

its for a weapon
07.11.09 10:43:09 am
Up
Vibhor
User
Offline Off
JadeStone has written:
still doesnt work

its for a weapon


Did you try my hot stuff?
it should work
My avatar describes my personality the best....Douchebag who have to save the princess without speaking anything
07.11.09 04:08:22 pm
Up
dragoana
User
Offline Off
if you wrote it in a shooting weapon's script it won't work
either you use Bloodshot's script for the projectile or mine or Vibhor's script for the enemy.
IMG:http://38.de/18r
Schnapsidee @dragoana. S2 Extension Mod IMG:http://38.de/18s
07.11.09 08:18:29 pm
Up
Builder2-0
User
Offline Off
s2 cmd health

/facepalm
07.11.09 09:51:46 pm
Up
Phyire
User
Offline Off
What does this below mean? I keep getting this on an odd occation in random maps.

---------------------------
Error!
---------------------------
Memory access violation
---------------------------
OK
---------------------------
IMG:http://miniprofile.xfire.com/bg/os/type/1/3virus3.png
08.11.09 07:38:52 am
Up
ohaz
User
Offline Off
a memory access violation occurs when the game trys to read or write on a part of your RAM when it's not allowed to do so, or when the location where it wants to read is empty.
You can't to anything to solve this problem, just save often and hope that it doesn't occure
https://ohaz.engineer - Software Engineering
08.11.09 06:33:15 pm
Up
Lar5
User
Offline Off
Hi! I'm trying to make a good Stranded 2 map, but i dont know how to make the npcs sell things...
How do i do it? Is it? Unit(hempguy)-scripts:

on:use {
page=start
title=Grandpa
text=start
Hey you. How's it going?
text=end
button=trade,I want to trade.
button=action:close,Don't bother me!

page=trade
title=Trade with grandpa
### Hempleaf -> Cookie
trade=start
sell=83,5
buy=66,1
trade=end
### Hempleaf -> Trunk
trade=start
sell=83,10
buy=7,1
trade=end
### Hempleaf -> Grapes
trade=start
sell=83,15
buy=45,3
trade=end
### Hempleaf -> Grain Pile
trade=start
sell=83,15
buy=42,3
trade=end
### Hempleaf -> Plums
trade=start
sell=83,15
buy=116,3
trade=end
### Hempleaf -> Coconut
trade=start
sell=83,20
buy=27,3
trade=end
### Hempleaf -> Banana
trade=start
sell=83,20
buy=14,3
trade=end
### Hempleaf -> Cacao Fruit
trade=start
sell=83,25
buy=67,3
trade=end
### Hempleaf -> Coffee Fruits
trade=start
sell=83,25
buy=70,3
trade=end
button=action:close,Cheers!
}
Roses are red, violets are blue. I got a shotgun and are looking for u...
08.11.09 08:17:21 pm
Up
Phyire
User
Offline Off
Is there NO way i can find out where this Memmory access violation originates from?
IMG:http://miniprofile.xfire.com/bg/os/type/1/3virus3.png
09.11.09 02:32:15 am
Up
Vibhor
User
Offline Off
Phyire has written:
Is there NO way i can find out where this Memmory access violation originates from?

Nope
just avoid areas which takes higher memory and CPU speed
My avatar describes my personality the best....Douchebag who have to save the princess without speaking anything
To the start Previous 1 2 ... 77 78 79 ... 121 122 Next To the start