The forums have permanently moved to forum.kirupa.com. This forum will be kept around in read-only mode for archival purposes. To learn how to continue using your existing account on the new forums, check out this thread.


Results 1 to 3 of 3

Thread: HELP: RPG hittest surroundings

  1. #1

    HELP: RPG hittest surroundings

    Hello people,


    Im creating a rpg.
    http://www.maxxdesign.nl/rpg/hometown.swf

    The character moves arround happy(lol), but i dont want him to walk over the house or the tree. So i put a hittest on each butten(left,right,up,down) with the tree as obstacle. But now i am going to add more obstacles, so like the house and a river etc. Do i have to create a hittest for each object? As you can see i tried something with red dots, but that doenst work either.

    or is there a better / other way to create obstacles?
    (by the way: i removed all the hittests at the moment, so thats why no hittest is in the above swf)

  2. #2
    Hey there are a lot of threads here, that have already discussed this topic. But still i'll give u a generall idea. Put all the Objects(like house,river,trees,etc..) in an array. And then iterate through this array and do AABB test on all those objects which are currently visible on the screen. Search the forums and you will find a lot of info on this. And puttin hittest on all the objects is a bad idea.
    Last edited by acebuddy29; April 17th, 2008 at 07:07 AM.

  3. #3
    i can give you a better idea....put all the obstacles under one movieclip and check for hitTest for that movieclip.
    MY BLOG

    I need a SPRITER who can do pixel arts for an arcade fighter project. If you can help out, please pm me.
    I also need someone who can write simple xml files.


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Home About kirupa.com Meet the Moderators Advertise

 Link to Us

 Credits

Copyright 1999 - 2012