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 2102 103 104121 122 Nächste Zum Anfang

alt Re: Scripting Questions

CPG
User Off Offline

Zitieren
@Hurri04
Thanks for the great code trick. I never would have considered using using global variables to transfer local variables. I still have some work to do on this script (mainly accounting for spawntimers negative values into natural number only variables) but at least now with your workaround the check occurs (since the check causes the crash of the game since my variables are not greater than zero). Thanks for all the great coding help.

alt Re: Scripting Questions

DontKnowToScript
User Off Offline

Zitieren
DontKnowToScript hat geschrieben
Guys-
Is there a way to make player defined times to do actions instead of fixed processes? that he chooses inside the game? E.g. player wants to study a research. he doesnt have much time though he needs to complete a part of it. how do i make something that when he starts to research,it doesnt write the time but when he wants to stop he does something and it stops instantly. how i do that?


I am sorry i have the hardest questions,but that means i want to make a good mod for everybody,so can you do your best trying to answer them? No push,im just curious how to do it.

alt Re: Scripting Questions

ab6100
User Off Offline

Zitieren
two questions

1 is there a "ai_gotstate" script thingy?

2 what is the script line for player movement?

please help

alt Re: Scripting Questions

DontKnowToScript
User Off Offline

Zitieren
for your first question is :
just use command if (getstatevalue("unit",ID,STATE ID)==1){
blablabla
}
i hope it helps. in id put id of unit and in state id the id of the state. im 99% sure the command is right,though i didnt experiment it much so try it.

alt Re: Scripting Questions

ab6100
User Off Offline

Zitieren
Thank you!

off topic- just found out my mods game.inf file was broken and I had to restart from the orignal. There goes 3 weeks of my life lol.

ps. Could someone please wright me a sample timer script, and how would I set a dialog box to close on trade
(for a gift from the gods) and set scripts to trigger on a buton.
1× editiert, zuletzt 27.06.10 23:34:14

alt Re: Scripting Questions

DontKnowToScript
User Off Offline

Zitieren
sample timer:
timer "class",id,time,multiplier (how much times the timer repeats. if its 0,then its infinite.5=5 times.that means time X multiplier=total time),"source"(script to execute at end of timer,can be a text container or a script file in mods/scripts.)

alt Re: Scripting Questions

DontKnowToScript
User Off Offline

Zitieren
Double No problem ;p

Another question: is it possible to make pictures pop up on screen as messages or something?
1× editiert, zuletzt 29.06.10 18:30:40

alt Re: Scripting Questions

ab6100
User Off Offline

Zitieren
how would i set an idem to not be able to be droped

edit*
got it
on:drop
     skip event;


lol fail

any whay...
how would i get an idem to switch when theres zero of it? like throwing spears switch to stabing spears when youve ran out?

ive tryed ...
1
2
3
4
5
on:attack1 {
		if (playergotitem(52)==0) {
			equip 1152;
		}
	}
2× editiert, zuletzt 04.07.10 05:17:09

alt Re: Scripting Questions

ab6100
User Off Offline

Zitieren
still dosent work : (
im gonna use throwing spears as ammo for hand

Edit* the on:drop
          skip event

thing dosent work.... please help

ps. can i have a sample "if" line useing if $fwater is not equal to 1

ive tryed if ($fwater!=1)
2× editiert, zuletzt 04.07.10 19:42:03

alt Re: Scripting Questions

bezmolvie
User Off Offline

Zitieren
Well, then, if all those don't work, you're doing something wrong in the first place. Are you putting the scripts in the right file, under the right item, in the right mod? Are you launching Stranded2 with that mod? Are you checking with the correct item ingame?

alt Re: Scripting Questions

ab6100
User Off Offline

Zitieren
yes yes yes yes. it is a wepon script in the idems_wepons.inf file for my mod The Games. witch is in a stand alone folder

alt Re: Scripting Questions

ttei
User Off Offline

Zitieren
projectileisc?Item-Typ,X,Y,Z,Modus, ... ,[,Offset][,Waffe][,Geschw.][,Schaden][,Drag]

The choice of the target, there are five modes with different parameters:

1 - Class, ID - The projectile flies to a particular object
2 - X, Y, Z - The projectile flies at a certain coordinate
3 - Pitch, Yaw - The projectile flies in a certain direction
4 - The projectile flies on the player
5 - range - except projectile flies to the next unit in range (players!)
6 - Range - The projectile flies to the next aggressive unit in range

Model how to write a script format
could someone please explain the parameters it takes?

alt Re: Scripting Questions

bezmolvie
User Off Offline

Zitieren
s2 cmd projectile

projectile (1,50,50,50,4,10);

This would create a projectile of item 1, a bag, at the XYZ coordinates of (50,50,50), and of mode 4, flies at the player, with a 10 offset so it starts off 10 more towards the player. Other modes need certain parameters, which the ,..., is replaced with. the [Offset], [WeaponType], [Speed], [Damage], and [Drag] are optional, But WeaponType, Speed, Damage, and Drag can only be used if the first parameter is 0.

alt Re: Scripting Questions

ab6100
User Off Offline

Zitieren
ok gave up...er postponed that script...

umm anywhay im haveing troble makeing skills for my mod could someone please help ?

ps. should this work

Mehr >
2× editiert, zuletzt 09.07.10 00:42:22

alt Re: Scripting Questions

ab6100
User Off Offline

Zitieren
yep games.inf

im using it to make other states

so like if the last thing you drank was salt water you lose 15 water a second or if your bleading every 5 seconds it heals some
Zum Anfang Vorherige 1 2102 103 104121 122 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtStranded II-ÜbersichtForenübersicht