Jump to content


Photo

rts movement


  • Please log in to reply
4 replies to this topic

#1 anerror

anerror

    GMC Member

  • GMC Member
  • 11 posts
  • Version:GM8

Posted 01 July 2012 - 10:01 PM

hello again. I am trying to get air units to fly over buildings but I am using schtauffen rts engine witch is using the grid engine that is built into game maker to move. it uses the mp_grid_add_instances() function to do so but with is it forbids anything to were that object is at in the grid. If you need it where is the file. post anything you can think of, and thank you for anyone who looks at this topic and or posts in it.
  • 0

#2 Jack Indie Box

Jack Indie Box

    GMC Member

  • GMC Member
  • 1460 posts
  • Version:GM:Studio

Posted 01 July 2012 - 10:21 PM

you havent really said whats wrong or anything much.

if it helps:
xx=grid_width*(x div grid_wdith); and same for y, would get the grid coordinate of a value(x for eg.). like snap to grid
  • 0

#3 anerror

anerror

    GMC Member

  • GMC Member
  • 11 posts
  • Version:GM8

Posted 01 July 2012 - 10:46 PM

you havent really said whats wrong or anything much.

if it helps:
xx=grid_width*(x div grid_wdith); and same for y, would get the grid coordinate of a value(x for eg.). like snap to grid

whats wrong is that if you use the grid_add if that object is in that cell of the grid no object that is moving and go through it. that makes it easy for a wall for a stopping all units but if you want air units that fly over buildings but you don't want ground units to go through the building that's the hard part. does that help sum up what is being asked a little
  • 0

#4 Jack Indie Box

Jack Indie Box

    GMC Member

  • GMC Member
  • 1460 posts
  • Version:GM:Studio

Posted 02 July 2012 - 07:12 AM

i havent used the grids too much. but how about having 2 grids? one for air and one for not air(your current one). the air one would only have obstacles that air units cant move to
  • 0

#5 anerror

anerror

    GMC Member

  • GMC Member
  • 11 posts
  • Version:GM8

Posted 02 July 2012 - 06:43 PM

i havent used the grids too much. but how about having 2 grids? one for air and one for not air(your current one). the air one would only have obstacles that air units cant move to

that's what i was thinking last night and thank you for your input.

Edited by anerror, 02 July 2012 - 06:44 PM.

  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users