Forum
Stranded II Scripts Scripting QuestionsEDIT:
My question: How to use defparam ? Description is in german
EDIT2:
Another question: How to know if some type of object exists?
I don't mean about in-game ID, I mean ID that is in smth_xxx.inf files.
edited 2×, last 23.03.10 03:36:51 pm
Vectar666 has written
EDIT2:
Another question: How to know if some type of object exists?
I don't mean about in-game ID, I mean ID that is in smth_xxx.inf files.
Another question: How to know if some type of object exists?
I don't mean about in-game ID, I mean ID that is in smth_xxx.inf files.
Err... My mod viewer does that... Exactly that... In the buildings page, each row has the building's in inf ID and the Object/Unit ID associated with that building.
I'm Just gonna upload a small fix now. Maybe you could try this version and see if something has changed for you Vectar.
Vectar666 has written
But I mean do this with S2 scripts!
So you mean, read through every script and grab any external scripts that it links to and display that?
And second script must find first non-existing item and make the new item on its id.
I know the second part of second script: def_override , for example. But how to indicates existing and non-existing ids BY USING SCRIPTS?
Edit: I have another question, how do I make a unit play a sound file when it flees?
edited 1×, last 24.03.10 03:46:08 am
use on:inhand commands
though you cannot slow the player or anything
Vectar666 has written
I don't know about projectile.
But I really forgot that you are unit too
Try that:
If not, then this:
Also try to change this 7 to 6, or speed value(-10 or -1) to 0.
EDIT: Yep, and if you want projectiles, maybe you can change it this loop "units" to "items".
Vibhor has written
it really makes unit go back
but the projectile speed is the same
EDIT:It also increases speed of everything
it even increased my speed
but the projectile speed is the same
EDIT:It also increases speed of everything
it even increased my speed
I don't know about projectile.
But I really forgot that you are unit too
Try that:
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
on:keyhit|yourkeyID|{ loop ("units"){ 	if(loop_id()>1){ 	 addstate "unit",loop_id(),"speed"; 		 statevalue "unit",loop_id(),"speed",-1; 		} 	} }
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
on:keyhit|yourkeyID|{ loop ("units"){ 	if(loop_id()>1){ 	 addstate "unit",loop_id(),7; 		 statevalue "unit",loop_id(),7,0; 		} 	} }
EDIT: Yep, and if you want projectiles, maybe you can change it this loop "units" to "items".
I've just found solution for this thing.(however, nobody need this because this post is 1 month old).
But:
1
2
3
4
5
2
3
4
5
on:keyhit|yourkeyID|{ loop ("units"){ 	 addstate "unit",loop_id(),60; 	} }
DontKnowToScript has written
How to make something a gun,but to cancel the smoke coming out of it?
You can make arbalest with ultra-fast projectiles. It will shoot almost like a gun, but will not create a smoke
Yes as i though. the projectile goes through the object whithut damaging it.
edited 1×, last 26.03.10 05:13:36 pm
It goes through because for big speed and because of 50 fps, it jumps over smth
DontKnowToScript has written
then suggest speed?
I think 50 or 100 or 200
EDIT: How to use closemenu command? It doesn't close cscr! Maybe id or smth?
EDIT2: It works, but keyrelease00 isn't working. Only keyhit.
EDIT3: Yes! Of course! Keyrelease just doesn't work with cscr, because game is paused!
edited 3×, last 26.03.10 07:47:09 pm
Vectar666 has written
I think 50 or 100 or 200
Thanks!
I have tried:
1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
on:impact { local $x,$z; $x=impact_x(); $z=impact_z(); $id=create("info",32,$x,$z); timer "info",$id,250,1,"new"; freevar $x; freevar $z; freevar $id; }
But nothing happens when the arrow hits to the ground...