1. Hello Guest! It's with a heavy heart that we must announce the removal of the Legacy GMC Archive. If you wish to save anything from it, now's the time! Please see this topic for more information.
    Dismiss Notice

physics particle group collision event

Discussion in 'Programming' started by PieBaron, Sep 25, 2016.

  1. PieBaron

    PieBaron Member

    Sep 13, 2016

    I've made a physics particle group which works great, and its colliding with the rest of the physics objects in my room.

    I would like to make it so when one of my "projectile" physics objects collide with the particle group, the projectile is destroyed.

    I tried assigning a name to the particle group on creation, like this:

    pPgrp = physics_particle_group_begin(flag, phy_particle_group_flag_solid, 576, 192, 0,0,0,0,c_white,1,1,1);

    then in the projectile step event I put in the code

    if place_meeting(x,y, argument0) instance_destroy();

    but I get the error:
    Variable obj_destroyer.pPgrp(100079, -2147483648) not set before reading it.

    I guess I can't do that because pPgrp isnt exactly an object?
    If the collisions are happening anyway, there must be a way to access those events?

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice