Author |
Message |
biggmak
|
Posted: Thu Mar 20, 2003 5:14 pm Post subject: help with 1d game |
|
|
im making a 1d game and theres a hill that i want to restrict the animations from comming in contact with this hill. i know how to set up an if statement to restric the character to stay within a box but not this hill. in the game something will be shot over the hill but i want the for loop for that object to exit when it comes in contact with this curve/hill. i hope you guys know what i mean.... |
|
|
|
|
 |
Sponsor Sponsor

|
|
 |
Tony

|
|
|
|
 |
biggmak
|
Posted: Thu Mar 20, 2003 7:15 pm Post subject: (No subject) |
|
|
buddy i know how to use loops, i was wondering if u could help me with restricting walls, and such for example in a 2d RPG game, where if a wall comes up the character can not go through it. i am aware if keeping the character in a 'BOX' but i can have him stop in front of objects that stick out of this box like buildings.
i was told that i could use something like this, which would plot a point on the screen that would restrict the character from comming in contact with. could i connect these points to make a 'wall' so that the charcter can't be allowed to pass through these connected points
code: | map (index)=
index (3x(400)+6) |
|
|
|
|
|
 |
biggmak
|
Posted: Thu Mar 20, 2003 7:19 pm Post subject: (No subject) |
|
|
"....but i CANT have him stop in front of objects sticking out of the main box....."
i put can infront of cant in other reply |
|
|
|
|
 |
Asok

|
Posted: Thu Mar 20, 2003 7:20 pm Post subject: (No subject) |
|
|
this can be done with simple if statements surrounding the coordinates around your walls/buildings
ie. if movingobjectxory = wallcoordinatexory then
direction = "" %stop moving
end if |
|
|
|
|
 |
|