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?
Forum
Stranded II Scripts Molotov-style script. Possible?Molotov-style script. Possible?
5 replies 1
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?
impact_x
impact_y
impact_z
areal_event
loop
if
inrange
addstate
first locate where the impact takes place, then start an areal event which has a loop in it which checks whether the object/item/unit which shall be set on fire is in range, if yes, add the fire state.
areal_state
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.
all the repetition is done by the loop command.
to get the ID of the current unit/item you can use the command loop_id.
in order to have something to compare with I'd advise you to use the 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 inrange command.
after all the loops are done you can delete the flag again with free.
1