- Game Maker Community
- → Viewing Profile: Posts: andykuo1
andykuo1
Member Since 08 May 2011Offline Last Active Nov 19 2012 05:02 PM
Community Stats
- Group GMC Member
- Active Posts 29
- Profile Views 1251
- Member Title GMC Member
- Age Age Unknown
- Birthday January 1
-
Gender
Male
0
none
Friends
andykuo1 hasn't added any friends yet.
Posts I've Made
In Topic: Unable to Get_Parent
13 August 2012 - 06:45 AM
OOOOOOOOO_OOOOOOOOO! I didnt realize that. Thx. Ima restructure my code and see wat happens... I really appreciate the help.
In Topic: Image Angle changes Place_meeting?
04 August 2012 - 01:19 AM
I have found the problem. When I set image_index back to 0 before I change the image_index, it seems to work fine. No more miscalculations with the place_meeting. I do not know why, but it seems to fix this. I put:
image_index = 0;
Then the script to align the objects.
Thank you for helping, I really appreciate it.
image_index = 0;
Then the script to align the objects.
Thank you for helping, I really appreciate it.
In Topic: Image Angle changes Place_meeting?
02 August 2012 - 03:15 PM
Well, thanks for helping, but the problem isnt the xx and yy, because that variable only changed in that script. Other than that it is used to draw_sprite.
I solved the problem, by using an alternative way, by drawing each sprite in a different direction, got that idea from you when you answered my other question
Therefore image_angle will not change at all. If anyone else knows why this happens I would still like to find out why.
To just put further clarification, the script above is in a press key event(spacebar). Then left press(another key event) to create the object in room on a 16*16 grid.
When you press the key(spacebar), obj_control uses:
with(obj_cell) {update the angle and image}.
Then the obj_cell do:
draw_sprite_ext(sprite_index,image_index,x+xx,y+yy,1,1,image_angle,image_blend,1);
That is the only scripts in the game. I hope that better helps.
I solved the problem, by using an alternative way, by drawing each sprite in a different direction, got that idea from you when you answered my other question
Therefore image_angle will not change at all. If anyone else knows why this happens I would still like to find out why.
To just put further clarification, the script above is in a press key event(spacebar). Then left press(another key event) to create the object in room on a 16*16 grid.
When you press the key(spacebar), obj_control uses:
with(obj_cell) {update the angle and image}.
Then the obj_cell do:
draw_sprite_ext(sprite_index,image_index,x+xx,y+yy,1,1,image_angle,image_blend,1);
That is the only scripts in the game. I hope that better helps.
In Topic: How to rotate sprite mask?
02 August 2012 - 12:30 AM
So...is there no way to rotate the mask for one instance? Like directly?
In Topic: Image Angle changes Place_meeting?
02 August 2012 - 12:26 AM
Well, what I was hinting at, is if your sprite is 48*48, and you rotate it, it could possible hit itself while checking for collision at +/- 24 pixels? But I see you included something to handle that.
I don't think your problem lies in this piece of code. Is it possible that you're not adjusting your x and y correctly with your xx, and yy?
...What do you mean by adjusting? If you mean adding it to x and y:
The object has a draw_sprite function drawing it with x+xx and y+yy. the sprite is 32*32 with the origin centered.
I cant have x += xx because if you do that multiple times, itll move.
Hope that helps.
- Game Maker Community
- → Viewing Profile: Posts: andykuo1
- Privacy Policy
- GMC Rules and Forum Rules ·



Find content