English Scripting Questions

2,429 replies
Goto Page
To the start Previous 1 2 ... 120 121 122 Next To the start
18.02.11 07:36:53 am
Up
Elimnator
User
Offline Off
Is there a on death script?
Code:
1
2
3
on:kill {
     Some function here.
}
No longer stranded...
18.02.11 10:11:08 am
Up
Kirschkaffee
User
Offline Off
on:kill is executed, when the object is destroyed. what exactly do you want to do that object? are you using it in a map or in the .inf-file?
18.02.11 06:16:18 pm
Up
Elimnator
User
Offline Off
In the map.
No longer stranded...
18.02.11 06:33:26 pm
Up
Kirschkaffee
User
Offline Off
Kirschkaffee has written:
what exactly do you want to do that object?


You should answer all questions. Kill can be called manually by event "kill" in another event or it is called when the object is destroyed. Also it would be good to know whether it is an unit or an object.
18.02.11 06:51:24 pm
Up
Elimnator
User
Offline Off
A unit.
No longer stranded...
19.02.11 01:27:05 am
Up
Kirschkaffee
User
Offline Off
well okay. if you dont really read the stuff i wrote, then i cant help you. i asked you twice now what the script shall be doing exactly and no answer to that. i give you a third chance to read trough the stuff i wrote.

To conclude:

Try to be more specific!
19.02.11 06:30:59 am
Up
Elimnator
User
Offline Off
I want it to stop a trigger when the unit dies, do I go:

On:kill {
     stoptrigger 30;
}

Edit: Also can I have a command something like this:

On:day{
     starttrigger 30;
}
On:night{
     stoptrigger 30;
}
edited 1×, last 19.02.11 08:41:51 am
No longer stranded...
19.02.11 09:37:40 am
Up
Kirschkaffee
User
Offline Off
Elimnator has written:
I want it to stop a trigger when the unit dies, do I go:

On:kill {
     stoptrigger 30;
}


Yes this should work fine. also you may want the body to be removed? then the free -command is your friend.

Elimnator has written:
Edit: Also can I have a command something like this:

On:day{
     starttrigger 30;
}
On:night{
     stoptrigger 30;
}


I am not sure about that on maps, but in normal modscripts you can create own events by defining them like you did above. you will have to call them with the event "name"; - command in an existing event like on:use or on:kill .

now the day and night stuff. on day will be about 6 a.m.? use an if-query for that. it should look that way:

Code:
1
if (hour()==6) { event "day"; }


the same for the night-event, usable in an existing event as i said.

and check out the scripting references, there you find explanations for the commands.

http://www.strandedonline.de/s2_commands.php?setlan=en
19.02.11 07:18:39 pm
Up
Elimnator
User
Offline Off
Ok, thanks
No longer stranded...
24.02.11 09:23:38 am
Up
hoodedbella
User
Offline Off
is it possible to add blur as a state and if so what myte the script go go like?
24.02.11 09:25:28 am
Up
Kirschkaffee
User
Offline Off
by blur you mean bleading? like when you got biten?
24.02.11 09:27:34 am
Up
hoodedbella
User
Offline Off
no like motion blur
24.02.11 09:27:57 am
Up
Xaeveax
User
Offline Off
I think he means blur as in motion blur. I don't think its possible to make states like that without modifying the source code. I know there are some "hidden states" that are available by adding the right Id's, such as speed, but I don't think blur is one of them
24.02.11 09:31:49 am
Up
hoodedbella
User
Offline Off
how about to add motion blur for a set amount of time if an item was used
24.02.11 09:35:22 am
Up
Kirschkaffee
User
Offline Off
i think this is your friend (from the adventuremapscript)

Code:
1
2
3
on:<event> {
     blur <strength>;
}


Strength goes from 0 to 1 according to scripting reference.
24.02.11 09:41:58 am
Up
Vectarrio
User
Offline Off
there is state "dizzyness" - that's what you get on start of adventure map02 (01 was intro)
24.02.11 10:00:18 am
Up
Kirschkaffee
User
Offline Off
no that is simple blur command on the map2-start, just checked it out. but yeah maybe

addstate "unit",1,"10"; will work too. Mouselook will be inverted and blur-effect activated.

with the addstate-command it also will be possible to add a timer.

so...

to an existing event
Code:
1
2
addstate "unit",1,"10";
timer "self",5000; // change the timer as you like


extra event:

Code:
1
2
3
on:timer {
     freestate "unit",1,"10";
}


this should do the work you wanted, though i didnt test it. This all is to be written into the itemscript
24.02.11 04:37:23 pm
Up
hoodedbella
User
Offline Off
thanks for the help
25.02.11 02:27:42 am
Up
Kirschkaffee
User
Offline Off
so it did work? i worried bout that the whole day
26.02.11 02:32:27 am
Up
TehNinja65
User
Offline Off
Alright, I am sorry, but i am not willing to search through 121 pages of posts to find my answer, so if anyone has asked this before, please excuse me. Also bear with me as i have never modded a game before, i only program in python.


I am hoping to make a mod for personal use, specifically a mod that turns Stranded 2 into a zombie apocalypse world.


to do that, i need to mess around with the map generator; where would i find the files to modify this? Also, how would i add specific ways for the map to generate? (I want buildings to be on the sides of roads... if that is too hard i could make the map generator make the entire terrain a road and just place buildings on it.) Also, is there a specific 3d modeler i need to use for Stranded 2, or can i just use blender? And what do i convert the files to/where do i put them?

In addition, i want to add a new enemy (zombie) and remove the existing ones. How would i do that?

The last thing i need to know is where i add crafting recipes and how do i add the materials to use for these buildings? (Like logs or branches or leaves in your inventory: how do i add materials that can be harvested and used?)
To the start Previous 1 2 ... 120 121 122 Next To the start