[CF-Devel] python plugin trigger bug?
crossfire-devel at archives.real-time.com
crossfire-devel at archives.real-time.com
Tue Dec 7 21:34:33 CST 2004
Ah, the activator is the switch in this case, I thought it should be
referencing the player activating the trigger as it is in other events.
Whoami is the object itself usually, no? My script had whoami to
determine the object being activated - whoami is not valid causing a
segfault...
Try this for the script:
import CFPython
activator=CFPython.WhoIsActivator()
activatorname=CFPython.GetName(activator)
whoami=CFPython.WhoAmI()
info = CFPython.GetEventOptions(whoami, 10) # 10 is trigger event
CFPython.Say(activator, "activator: script is running")
CFPython.Say(whoami, "object: script is running")
>
Sorry, but I can't reproduce your problems here. I use the current cvs
>
server. The objects (pedestal/button) in my map are:
>
>
arch pedestal
>
event_trigger_plugin Python
>
event_trigger /pedestal.py
>
x 2
>
y 6
>
end
>
arch button_small
>
event_trigger_plugin Python
>
event_trigger /pedestal.py
>
x 3
>
y 6
>
end
>
>
The script (pedestal.py) I use is:
>
>
import CFPython
>
CFPython.Say(CFPython.WhoIsActivator(), "activator: script is running")
>
>
Whenever I enter or leave the pedestal/button, I receive the messages
>
>
pedestal says: activator: script is running
>
>
or
>
>
small button says: activator: script is running
>
>
_______________________________________________
>
crossfire-devel mailing list
>
crossfire-devel at lists.real-time.com
>
https://mailman.real-time.com/mailman/listinfo/crossfire-devel
_______________________________________________
crossfire-devel mailing list
crossfire-devel at lists.real-time.com
https://mailman.real-time.com/mailman/listinfo/crossfire-devel
More information about the crossfire
mailing list