Forum

> > Stranded II > Scripts > Scripting Questions
Forums overviewStranded II overview Scripts overviewLog in to reply

English Scripting Questions

2,429 replies
Page
To the start Previous 1 2120 121 122 Next To the start

old Re: Scripting Questions

Kirschkaffee
User Off Offline

Quote
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?

old Re: Scripting Questions

Kirschkaffee
User Off Offline

Quote
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.

old Re: Scripting Questions

Kirschkaffee
User Off Offline

Quote
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!

old re

Elimnator
User Off Offline

Quote
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

old Re: Scripting Questions

Kirschkaffee
User Off Offline

Quote
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:

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

old blur effect

hoodedbella
User Off Offline

Quote
is it possible to add blur as a state and if so what myte the script go go like?

old Re: Scripting Questions

Xaeveax
User Off Offline

Quote
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

old Re: Scripting Questions

Kirschkaffee
User Off Offline

Quote
i think this is your friend (from the adventuremapscript)

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

Strength goes from 0 to 1 according to scripting reference.

old Re: Scripting Questions

Kirschkaffee
User Off Offline

Quote
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
1
2
addstate "unit",1,"10";
timer "self",5000; // change the timer as you like

extra event:

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

old Re: Scripting Questions

TehNinja65
User Off Offline

Quote
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 2120 121 122 Next To the start
Log in to reply Scripts overviewStranded II overviewForums overview