|
NAGN
|
 |
« Reply #885 on: January 16, 2010, 08:31:40 pm » |
|
Erm how is that coolcube going to work, and WTF is it for?
This game uses wallmasks, so if Only I knew how to detect angles...
hint: use direction. direction is an angle I did use direction. it failed. Wait how do I even use direction anyways, I just ripped the available code...
|
|
|
|
|
Logged
|
  [im
|
|
|
|
NAGN
|
 |
« Reply #886 on: January 16, 2010, 08:32:38 pm » |
|
Here's mine.
Destroy event for object Portile:
move_contact_solid(direction, speed); a=0; b=0; if !place_free(x+6,y) a+=1; if !place_free(x-6,y) a-=1; if !place_free(x,y+6) b+=1; if !place_free(x,y-6) b-=1; if(active) { portal=instance_create(x,y,Portal); portal.color=color; portal.direction=point_direction(x,y,x+a,y+b); portal.image_angle=portal.direction; }
Yeah I thought about place_free, hm. I'll try that.
|
|
|
|
|
Logged
|
  [im
|
|
|
|
NAGN
|
 |
« Reply #887 on: January 16, 2010, 08:39:03 pm » |
|
Hey it works I'll just tweak it so that it doesn't spin uncontrollably when it hits a corner 
|
|
|
|
|
Logged
|
  [im
|
|
|
|
|
|
Phantom Brave
|
 |
« Reply #889 on: January 16, 2010, 08:46:44 pm » |
|
I know exactly hwo to fix that but it's really complicated and I don't want to delve into the code right now.
|
|
|
|
|
Logged
|
 Linkin Park lyrics here
|
|
|
|
NAGN
|
 |
« Reply #890 on: January 16, 2010, 08:57:48 pm » |
|
I know exactly hwo to fix that but it's really complicated and I don't want to delve into the code right now.
So pretty much, I'm going to replicate this simple engine: http://gmc.yoyogames.com/index.php?showtopic=329554now with this direction, would it be if direction=270 for down or something?
|
|
|
|
|
Logged
|
  [im
|
|
|
|
Dusty
|
 |
« Reply #891 on: January 16, 2010, 09:02:24 pm » |
|
I know exactly hwo to fix that but it's really complicated and I don't want to delve into the code right now.
So pretty much, I'm going to replicate this simple engine: http://gmc.yoyogames.com/index.php?showtopic=329554now with this direction, would it be if direction=270 for down or something? 0 is right, 90 is down, 180 is left, 270 is up. but i may be wrong
|
|
|
|
|
Logged
|
|
|
|
|
NAGN
|
 |
« Reply #892 on: January 16, 2010, 09:04:12 pm » |
|
I know exactly hwo to fix that but it's really complicated and I don't want to delve into the code right now.
So pretty much, I'm going to replicate this simple engine: http://gmc.yoyogames.com/index.php?showtopic=329554now with this direction, would it be if direction=270 for down or something? 0 is right, 90 is down, 180 is left, 270 is up. but i may be wrong Oh wait I found a chart 
|
|
|
|
|
Logged
|
  [im
|
|
|
|
NAGN
|
 |
« Reply #893 on: January 16, 2010, 09:08:43 pm » |
|
so yeah
if direction>45 && direction<90
direction==90 or whatever I set the variable to
|
|
|
|
|
Logged
|
  [im
|
|
|
|
aftershockpivot
|
 |
« Reply #894 on: January 16, 2010, 10:02:51 pm » |
|
Here's mine.
Destroy event for object Portile:
move_contact_solid(direction, speed); a=0; b=0; if !place_free(x+6,y) a+=1; if !place_free(x-6,y) a-=1; if !place_free(x,y+6) b+=1; if !place_free(x,y-6) b-=1; if(active) { portal=instance_create(x,y,Portal); portal.color=color; portal.direction=point_direction(x,y,x+a,y+b); portal.image_angle=portal.direction; }
That definately makes alot more sense than my idea.
|
|
|
|
|
Logged
|
|
|
|
|
♫Sani Sani Disco♫
|
 |
« Reply #895 on: January 16, 2010, 10:30:28 pm » |
|
Oh, and rather than use vspeed, just use normal speed and make the player's direction the opposite of the portal's to keep the momentum going.
Just an idea.
|
|
|
|
|
Logged
|
I don't like it.  Oh, well, you might as well pack up and stop now, because he doesn't like it Asdf64: "ultros turned me on" - sani 2013
|
|
|
|
Phantom Brave
|
 |
« Reply #896 on: January 16, 2010, 10:31:12 pm » |
|
character.direction=portala.direction-portalb.direction or something
|
|
|
|
|
Logged
|
 Linkin Park lyrics here
|
|
|
|
NAGN
|
 |
« Reply #897 on: January 16, 2010, 10:47:36 pm » |
|
Oh, and rather than use vspeed, just use normal speed and make the player's direction the opposite of the portal's to keep the momentum going.
Just an idea.
I took that from that portal engine thing The orientation is still wacky, more reliable but still occasionally doesn't work at certain angles
|
|
|
|
|
Logged
|
  [im
|
|
|
|
Rock
|
 |
« Reply #898 on: January 17, 2010, 06:21:25 am » |
|
Work with the portal's direction to determine which sprite to use. like, if direction="w" or direction="x"{image_index=0}else if direction="y" or direction="z"{image_index=1} I was going to add 4 special walkmask types.
|
|
|
|
|
Logged
|
New game much? 2D platforming stealth much?
|
|
|
|
NAGN
|
 |
« Reply #899 on: January 17, 2010, 10:05:09 am » |
|
Work with the portal's direction to determine which sprite to use. like, if direction="w" or direction="x"{image_index=0}else if direction="y" or direction="z"{image_index=1} I was going to add 4 special walkmask types. I considered that two, but then I was like hell no. Imma release beta 5 soon, then I'll fix up floor portals and momentum
|
|
|
|
|
Logged
|
  [im
|
|
|
|