danifer Posted January 25, 2008 Share Posted January 25, 2008 local healthPickup = createPickup ( x, y , z, pickupType, amount, respawn ) pickup is created fine and when I walk over it , it dissappears and reappears after given respawn time. Like it should. And my health increases of course. when I hook onPickupUse or onPickupHit (not both at the same time) I run into problems. Tried both. In the event handler function I sent a msg to the chatbox telling what the user picked up, but I always get two messages like the event was triggered twice. How is this possible ? Since it dissappears , you shouldn't be able to pick a pickup more than once , right? Until it respawns. Another thing, first I sat pickupType to integer 0 since I first read this in the wiki for the function createPickup which said an integer value, then I read the wiki for the element Pickup and what I gathered there was that it was supposed to be set to the string "health". only difference between those were first scenario wrote out this...twice: (using pickupType = "health") "you picked up 100 health " second scenario wrote out (using pickupType = 0): "you picked up 100 health" and then "you picked up 0 melee" What am I doing wrong? Thanks! Link to comment
danifer Posted January 25, 2008 Author Share Posted January 25, 2008 anyone ? is there some script already available that uses these events without the problems I've experienced? Link to comment
darkdreamingdan Posted January 27, 2008 Share Posted January 27, 2008 The XML .map syntax uses "health", the pickup type function uses integers Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now