Jump to content


Member Since 02 Aug 2004
Offline Last Active Mar 27 2016 08:14 PM

Topics I've Started

Object is shaky when followed by view -Solved-

06 January 2015 - 06:23 AM

I am very confused with this issue


My hero object begin shaking when it is moving around the room and followed by view.


Weird thing is sometime seem to work before it's slope code is executed when player gets close to ledge or slope, then goes in "shake mode"


The code: (from Foxengine 2,3)

for(i=0;i<abs(wspeed);i+=0.5) {
    var st, st2; st = place_free(x,y+2); st2 = sign(wspeed)/2; 
    if(!st && place_free(x+st2*0.5,y+2)) { x+=st2*0.6; y+=2; }
    else if(!st && place_free(x+st2*0.8,y+1)) { x+=st2*0.8; y+=1; }
    else if(place_free(x+st2,y)) { x+=st2; }
    else if(!st && place_free(x+st2*0.8,y-1)) { x+=st2*0.8; y-=1; }
    else if(!st && place_free(x+st2*0.6,y-2)) { x+=st2*0.6; y-=2; }
    else if(!st && place_free(x+st2*0.4,y-3)) { x+=st2*0.4; y-=3; }
    else break;
Although I have no idea if the issue comes from there, I tried to floor the view coordinates to avoid some issue with weird numbers or anything.
I'm lost here! I know the question is vague, maybe someone has an idea or a workaround... I feel like I did not have this issue with the same engine in older GM versions, although I'm not sure of this

Clicking both on UI buttons and off them

05 September 2014 - 05:28 AM

I would like buttons similar to World of Warcraft or Starcraft.


When I click my button it activates the spell, then I want to either click on the battlefield to cast the spell, click again on the button to cancel the spell (or other buttons for other options).


Now I can think of a few ways but I feel like there is a smartest/standard way to do this.


If I use the global click, I need to detect if the mouse click on the button, so the spell is not casted if I click on the button because of global mouse action


Any help or guidelines on this would be very appreciated, I am pretty unexperienced with user interface and such.

Assigning Variable To Created Instance'S Id

15 May 2014 - 09:38 AM

I create an instance from a spawner object and try to set variables to the id of the instance. Since GM removed the function 'treat unitialized variables as 0', I need to set that variable in the object's create event.


However, it seem to overwrite what I set in the spawner object. The following code works to set the direction, which is a built in variable. However, it doesn't work for the other variables I'm trying to set.


spawned = instance_create(x,y,obj_sphere_1hit)
spawned.direction = spawn_direction
spawned.canturn_timer = canturn_timer



Any hint of how to achieve this would be appreciated

Compile Failed And There Is No Compile Window

02 April 2014 - 09:56 PM

I didn't open my project for a while, and now there was two sprites with the same name and it created an error.


I deleted one of the sprite, and now it says compile failed, but there is no compile window. I know it could be caused by many things but I can't figure out how to fix this.


Any one have some ideas of where to look for to fix this? I know question is vague but I'm clueless...

Trick To Avoid Instance To Stack? _Solved_

24 March 2014 - 06:33 AM

I'll try to explain as well as I can. I'm making a top down game with many instance following the hero and I don't want them to stack.


I use step towards point so the instance don't stack, but when i play with their motion they end up stacking, and I'm trying to find solutions to smoothly get them to move apart until they out of collision, but none of my attemps had really good results.


Hopefully this make some sens, I know the question is a bit vague..