You need to trace the object's path to the point where it hits the slope. Then, draw an imaginary line at a right angle to the slope and mirror the object's velocity in it.
NB: To draw a right angle, divide negative one by the gradient.
- Game Maker Community
- → Viewing Profile: Posts: Ajw1995
Ajw1995
Member Since 28 Oct 2011Offline Last Active Jan 15 2012 04:05 AM
Community Stats
- Group New Member
- Active Posts 8
- Profile Views 1013
- Member Title GMC Member
- Age Age Unknown
- Birthday Birthday Unknown
-
Gender
Not Telling
0
none
Friends
Ajw1995 hasn't added any friends yet.
Posts I've Made
In Topic: Slopes problem.
10 January 2012 - 03:43 AM
In Topic: function/way of making autotiles?
10 January 2012 - 03:20 AM
Try:
With tle_water
if y - 32 = other.y
other.tex1 = sprite_get_texture(spr_water_grass_top,0)
else if y + 32 = other.y
other.tex1 = sprite_get_texture(spr_water_grass_bttm,0)
else
other.tex1 = sprite_get_texture(spr_water_grass_mid,0)
With tle_water
if y - 32 = other.y
other.tex1 = sprite_get_texture(spr_water_grass_top,0)
else if y + 32 = other.y
other.tex1 = sprite_get_texture(spr_water_grass_bttm,0)
else
other.tex1 = sprite_get_texture(spr_water_grass_mid,0)
In Topic: ds_grid functions broken
10 January 2012 - 02:01 AM
I'm having problems with grids as well... Using GM 8.1. Every time I store a value, it reads back as 0. I really don't think it is just me, because I have made a test game with one object whose purpose is only to write to and read from a grid. It read 0 every time - does the ds_grid_set function return a value if it fails?
In Topic: Problem: Making Enemies That Avoid Each Other
01 January 2012 - 04:59 AM
"Posted 07 May 2008 - 02:01 AM"
If he hasn't solved it in more than 3 years, he's probably moved on.
[/quote]
derp. I always forget to look at the dates.
If he hasn't solved it in more than 3 years, he's probably moved on.
[/quote]
derp. I always forget to look at the dates.
In Topic: Problem: Making Enemies That Avoid Each Other
30 December 2011 - 11:07 PM
Would it help you to break your map up into basic large areas, (i.e. use a navigation mesh), do your pathfinding, and then use a collision avoidance system within each area? It would reduce the amount of pathfinding needed, and your units wouldn't collide. I recommend Paul T's big rant about navigation meshes, at www.ai-blog.net/archives/000152.html and Craig Reynold's papers, which comes with some limited source code examples, at www.red3d.com/cwr/steer/ and www.opensteer.sourceforge.net/
- Game Maker Community
- → Viewing Profile: Posts: Ajw1995
- Privacy Policy
- GMC Rules and Forum Rules ·



Find content