Forum

> > Stranded II > Scripts > addstate to an item
ForenübersichtStranded II-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch addstate to an item

4 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt addstate to an item

JasJack67
Super User Off Offline

Zitieren
im trying to add a state to an item when i drop it...but it does not work for state 22(flare) or state 24 (light)

1
2
3
4
on:drop {
        addstate "self",22;
        statesize "self",22,25;
         }

Do I need to alter the code for state 22 or 24 to work on an "item"? It works for all the other states...like the item will emit particles or bleed if i code them states, just the same.

a have searched/read posts about addstate, but not specifically this issue im having.

as always, thank you in advance for any help.

alt Re: addstate to an item

Hurri04
Super User Off Offline

Zitieren
I'm not sure but maybe this has to do with the problem that there can only be 7 (or something like that) lightsources on an island. one of these is alsready used for the sun and when you start more fires than there are lightsources left you will see that the last lit wont emit light.

make sure you are testing on a map which is free from other lightsources.


another thing that I could mention is that upon dropping an item 2 events are triggered: on:drop and on:create. this happens because there is a new instance of the item created when dropping it.

so maybe you could put something together with on:drop, s2 cmd skipevent, s2 cmd event, s2 cmd create and s2 cmd addstate.

alt Re: addstate to an item

JasJack67
Super User Off Offline

Zitieren
thanks you Hurri again...

hmm...i was unaware of the 7 light sources limit.

ok...i have worked around the problem and had to make a change in my idea.

thanks for your suggestions/help.

alt Re: addstate to an item

JasJack67
Super User Off Offline

Zitieren
wb Builder2-0

thanks for the input.

I have tried that adding on create, on load, on drop, and a few other combinations, skipevent etc....nothing would allow me to add state 22 or 24 to an "item".

"objects" yes "units" yes...but "Items" no. Weird I could add any other state and it works...but not Light/Flare.

anyways...i have already went a different route/idea.
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtStranded II-ÜbersichtForenübersicht