• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Windows Failure "instance_create"

B

Benito

Guest
Hello

I have several problems with the instances and wanted to ask if it is normal what happens to me.
I have a script that checks the game time and makes the character appear or not.
When seeing the pc slowed down I added in the event "create" this code "x = mouse_x" and this is the result.
To call the object i use this instruction from the HUD.

Code:
If (global.lugar == argument0)
     {
     Instance_create (854,154, obj_Lisa);
     }
     Else {instance_deactivate_object (obj_Lisa);}
Why instaced object have this result with x=mouse_x?
 

Attachments

F

Frozen Stick

Guest
Well it will always creates the Object at the X position of the mouse as long as the global.lugar == argument0
create a variable and change the code to this:
If (global.lugar == argument0)
{
if c=0
{
Instance_create (854,154, obj_Lisa);
c=1;
}
}
Else {instance_deactivate_object (obj_Lisa);}
 
B

Benito

Guest
Well it will always creates the Object at the X position of the mouse as long as the global.lugar == argument0
create a variable and change the code to this:
If (global.lugar == argument0)
{
if c=0
{
Instance_create (854,154, obj_Lisa);
c=1;
}
}
Else {instance_deactivate_object (obj_Lisa);}
Thanks. I use "global.c=0"; in scr_variables and "global.c==0" condition in scr_horario, this run now!!
:):):):)
 
Top