Forum

> > Stranded II > Scripts > Molotov-style script. Possible?
ForenübersichtStranded II-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Molotov-style script. Possible?

5 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Molotov-style script. Possible?

pupp3tStudios
User Off Offline

Zitieren
Alright, so I'm working on Pupp3t's Mod, and I thought of an idea.
Is it possible that you can throw the proposed bottle at a unit so it can obtain the "flame" state, and the "flame" state can spread to surrounding objects/units/items via the blast radius?

alt Re: Molotov-style script. Possible?

Hurri04
Super User Off Offline

Zitieren
oh yeah, with this command at least the loop for all the objects inrange wouldn't be necessary any more.

though the description says that it only works for objects so you'd still need to loop the units and the items if you also want them to catch fire.

alt Re: Molotov-style script. Possible?

Hurri04
Super User Off Offline

Zitieren
actually you just have to use it twice, for the units and for the items (since you can use s2 cmd areal_state for the objects).
all the repetition is done by the s2 cmd loop command.

to get the ID of the current unit/item you can use the command s2 cmd loop_id.

in order to have something to compare with I'd advise you to use the s2 cmd create command and create e.g. a flag-info at the position of the impact, then use its ID as the second ID in the s2 cmd inrange command.

after all the loops are done you can delete the flag again with s2 cmd free.
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtStranded II-ÜbersichtForenübersicht