Topic: Scripting Suggestion: 'danger_on' 'danger_off'

Maybe if you have an object, you can make it so that a similar thing to 'strong_player' is applied:

'danger_on' - any time the player collides with the object, the player takes damage
'danger_off' - normal reaction to collision

This saves a lot of state switching for things like projectiles that require you to shift back and forth between hurting the player and moving.

I'd say this could go in very low priority, but I'd at least like to see this considered sometime in the future.

Last edited by SilverstepP (2011-07-05 17:36:44)

Re: Scripting Suggestion: 'danger_on' 'danger_off'

you can put a dummy child object that is attached to your object

danger_on = change_child_state "dummy" "on"
danger_off = change_child_state "dummy" "off"

dummy: if my state is "on", then the player gets hit if he or she collides with me.