Jump to content


Nicolaibonde

Member Since 20 Sep 2011
Offline Last Active Mar 04 2012 12:36 PM

Topics I've Started

Collision

25 February 2012 - 09:40 PM

I want and object to be deleted when it is under my "obj_hero" how can i do this.
this code doesn't work.
if place_meeting(x,y,obj_hero){
            instance_destroy();
}
it just deletes it when it collides (as expected) ;)

! is not working for me

25 February 2012 - 03:42 PM

i have this and it doesn't work
    
if obj_inventory.slot1 = 0{
        obj_inventory.slot1 = obj_item.name;
    }
    if[b] !(obj_inventory.slot1 = 0) a[/b]nd obj_inventory.slot2 = 0 {
        obj_inventory.slot2 = obj_item.name;

    } 
it just has to check if obj_inventory.slot1 is not equal to 0 :)

some one know what im doing wrong

GML script

18 February 2012 - 10:00 PM

my problem is that i want to, have all my code in my step event, but i cant figure out how i should bring the variabels from the create action into the step event (via script).
i thought that there had to be an easy way to set som variabels only ones in GML:)

Thanks all ready

Multiple objects!

18 February 2012 - 03:26 PM

I have a problem were i have a player object, and for now only one enemy object.
From the enemy object i would like to draw a line from a certian distance to the player and then it should now towards the player.
That is working , but if i have to objects it only draws one line, and both enemies move towards me if one of them is to close.

How can i fix that :)