Jump to content

zombie kill (code)


Recommended Posts

Show me the function that triggers your event, please.

As far as I know, the problem is not this function here.

Also, the semicolon(;) after givePlayerMoney() isn't necessary.

Anyway, the function that triggers this event should be passing the parameter "killer", since you're using it in the handler.

i.e. something like: triggerServerEvent("onZombieWasted", zombieElement, killer [, other parameters])

where "zombieElement" is defined within the scope of this event trigger, before you trigger it, as well as the "killer" variable (that being a player element).

I would really have to see the rest of your script to be able to help you better. I have no idea how you're handling these "zombie elements", for instance.

Hope that helps a little,

BladeArtist

Link to comment

kevin, are you sure you have the newest version of zombie script?

BladeArtist, he knows NOTHING about lua, so asking these questions are pointless ;/

kevin, be sure to set this serverside..

and if something is not working, try to DEBUG it.

how to debug:

login as admin (in-game)

and in console type: "debugscript 3"

debug window will appear on the bottom of screen..

write here any errors you can find in debug window

Link to comment

I'm interested why scripters think it's the event consumer's responsibility to add the event, rather than the event emitter's? When I envisioned this system, I expected the resource that triggered event to register the event.

Link to comment
I'm interested why scripters think it's the event consumer's responsibility to add the event, rather than the event emitter's? When I envisioned this system, I expected the resource that triggered event to register the event.

When events are being fired intra-resource across server-client, you almost have to declare it on the receiving side... Unless I've missed something major and you can actually add events for "the other side", but that makes little sense.

Link to comment
I'm interested why scripters think it's the event consumer's responsibility to add the event, rather than the event emitter's? When I envisioned this system, I expected the resource that triggered event to register the event.

When events are being fired intra-resource across server-client, you almost have to declare it on the receiving side... Unless I've missed something major and you can actually add events for "the other side", but that makes little sense.

To me it makes no sense if each resource need to add new event (which was already made by other resource). If you add an event, it should be accesses from all resources... I don't know why but addEvent sometimes solves the problem of events not being triggered, "sometimes" because usually it's scripter's fault when attaching events to wrong elements but in this case root element is correct.

Link to comment
  • 3 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...