Forum

> > Stranded II > Scripts > Scripting Questions
ForenübersichtStranded II-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Scripting Questions

2.429 Antworten
Seite
Zum Anfang Vorherige 1 2120 121 122 Nächste Zum Anfang

alt Re: Scripting Questions

Kirschkaffee
User Off Offline

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

alt Re: Scripting Questions

Kirschkaffee
User Off Offline

Zitieren
Kirschkaffee hat geschrieben
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.

alt Re: Scripting Questions

Kirschkaffee
User Off Offline

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

alt re

Elimnator
User Off Offline

Zitieren
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;
}
1× editiert, zuletzt 19.02.11 08:41:51

alt Re: Scripting Questions

Kirschkaffee
User Off Offline

Zitieren
Elimnator hat geschrieben
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 hat geschrieben
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

alt blur effect

hoodedbella
User Off Offline

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

alt Re: Scripting Questions

Xaeveax
User Off Offline

Zitieren
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

alt Re: Scripting Questions

Kirschkaffee
User Off Offline

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

alt Re: Scripting Questions

Kirschkaffee
User Off Offline

Zitieren
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

alt Re: Scripting Questions

TehNinja65
User Off Offline

Zitieren
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?)
Zum Anfang Vorherige 1 2120 121 122 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtStranded II-ÜbersichtForenübersicht