English addstate to an item

4 replies
Goto Page
To the start Previous 1 Next To the start
04.11.12 06:26:14 pm
Up
JasJack67
Super User
Offline Off
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)

Code:
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.
The Survivalist_12-24-19 is now available. DOWNLOAD HERE >The Survivalist 12-24-19 | Performance-In options keep Water Detail off
04.11.12 08:22:25 pm
Up
Hurri04
Super User
Offline Off
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.
05.11.12 04:17:32 am
Up
JasJack67
Super User
Offline Off
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.
The Survivalist_12-24-19 is now available. DOWNLOAD HERE >The Survivalist 12-24-19 | Performance-In options keep Water Detail off
05.11.12 09:41:51 am
Up
Builder2-0
User
Offline Off
On:drop, create a new item (lit).
On that item, set on:create to add the states.
06.11.12 03:11:48 pm
Up
JasJack67
Super User
Offline Off
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.
The Survivalist_12-24-19 is now available. DOWNLOAD HERE >The Survivalist 12-24-19 | Performance-In options keep Water Detail off
To the start Previous 1 Next To the start