I'm just trying to trigger an function with an action assigned to the entity that gets hit by the player. and add +10 to the score this is what i have come up with on help doc and it still not working in any scene of the word.
function hit_star() {
if (event_type == EVENT_ENTITY) // the Player has collided with one of the entities in the level? { ptr_remove(me); // disappear when hit score += 10; } }
action pick_up_star() { my.emask |= ENABLE_ENTITY; // make entity sensitive for entity collision my.event = hit_star();
}
Re: Need some help with Collision event!
[Re: SpearBang]
#316541 03/24/1019:0303/24/1019:03
This is because the event is a function pointer. Adding the parenthesis means it would assign the return value of the function, and not the actual function itself.
Last edited by DJBMASTER; 03/24/1019:27.
Re: Need some help with Collision event!
[Re: DJBMASTER]
#316559 03/24/1021:3903/24/1021:39
I tryed this but still the player walks and hits the entity and nothing happens and the panels digits are still saying 0 i am useing Intense X copper but still.