I just wonder what kind of enemy could make you being stuck in the ground... maybe a mole...?
Forum
Stranded II Scripts Scripting QuestionsI just wonder what kind of enemy could make you being stuck in the ground... maybe a mole...?
script=start
on:use {
play "sfx/drumlow.mp3";
}
script=end
Shouldn't that work? Or do I need something else?
but if you want the script to let the sound play when you hit the drum you should write "on:hit" instead of "on:use". you maybe write some more lines to prevent the drum from getting destoryed.
1
2
3
4
5
6
7
8
9
10
11
12
2
3
4
5
6
7
8
9
10
11
12
on:start { 	local "$health"; 	$health=health("self"); } on:hit { 	$glob_health=health("self"); 	$diff=$health-$glob_health; 	if($diff!=0) { 		heal "self", $diff; 	} }
this should always repair the drum automatically when it is hit.
For example:
1
2
3
4
5
6
2
3
4
5
6
var=my_var,Example,80,0; script=start on:hit{ 	msg "My var: $my_var"; } script=end
Message wiil be "My var: 0" instead of "My var: 80". But $my_var is now local variable.
1
var=$myvar, Example, 80, 0;
so with this command the object that has this script in its definition will have a box in the editor where you can set a variable to a certain value which normally is 80 (when not editing it). the text to the left of the box will be "Expample" (without the quotation marks) and it is a local variable because of the 0 at the end.
1
var=water,Water,0,0
1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
on:start { 	$m_id=randomcreate("object", [TYPE OF THE OBJECT]); 	$m_x=getx("object", $m_id); 	$m_z=getz("object", $m_id); 	$marker_id=create("info", 36, $m_x, $m_z); 	showindicator $marker_id; 	setindicatorlook $marker_id, [VALUE BETWEEN 1 AND 4]; 	setindicatorinfo $marker_id, "[TITLE OF THE INDICATOR ON THE MAP]"; }
random_01_endless_e.inf
random_02_endless_n.inf
random_03_endless_h.inf
1
2
3
4
5
2
3
4
5
on:eat { 		process "Drinking",1000; 		drink 5,0,50,0; 		find [TYPE OF EMPTY BOTTLE]; 	}
you can get the type-number by hovering the mouse over the icon of the empty bottle in the editor.
For example, through a trigger or something, can i make it turn to nighttime even when it's during the day?
you could start a map where you just stand there for a while, like 10 minutes real-time which you clock on your watch or something and then you open the character menu to have a look at the day, open the inventory and use a watch to get the hours and minutes.
then you have to figure out how long one minute ingame is in real-time.
(I recommend to clock a very accurate value and use a map that you created in the editor, with an arcade-info on it so you wont get hungry/thirsty/tired while you wait, and you can also give yourself a watch to clock the hour and minute!)
next you can use the command timer and trigger an event every few seconds (the amount of seconds one ingame minute takes minus a certain factor to make the ingame minutes have less seconds which the player cant prove because he cant check the seconds ingame).
using this you can skip an ingame minute from 60 ingame-seconds (which are less than 60 real-time-seconds!) to a lower amount, just set the current minute +1, or if the current minute is 59 set it to 0 and set the current hour +1 (same with days).
so if you'd skip half of the minutes a day also would last half as long. the sun should automatically rise faster because it is connected to the current time that is.
at least I think that is how it should work, havent tested it myself yet but I'm pretty sure it will work
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!
button=info,Could you tell me something?
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!
Page=info
title=Grandpa
text=I'll spare some info what do you want to know?
text=end
button:weapons
button:action:close, No thanks. Bye!
Page=weapons
title=Grandpa
text=I know a bit about weapons so I'll tell you how to make some good ones.
text=end
button:Spears
button:Bow
button:Ammo
button:action:close, No thanks I'll just experiment.
Page:Spears
title=Grandpa
text=I know two types of spears the normal spear whitch is simply made with a branch+stone and the claw spear which bleads the victim to death made by claws+branch
1
page=Spears
Otherwise eveyrhint looks cool
EDIT: A whole lotta that code is wrong actually.
Replace all the ":"'s with "="'s otherwise your code wont work correctly!
this is the code you have to use for dialogues, you cant simply write it into the normal scriptbox of a unit.
the code you wrote there goes into a text container (which you can find at the infos) and then you have to look up and remember the ID of that text container (click on the text container again, you can find it at the top) because you will need it in the script that actually goes into the scriptbox of the unit:
1
2
3
2
3
on:use { 	dialogue "start", "[WRITE THE ID OF THE TEXT CONTAINER HERE, WITHOUT THE BRACKETS]"; }
Edit- Also, is there a way to make it that when I use attack2, it uses a different kind of behavior? for example, using a melee attack with a pistol?
edited 1×, last 22.11.10 09:50:36 am
i want that if i drop item X that you get a timer and when the time is over Item X dissapear.
thanks already