|
Post by WarDragon on Oct 18, 2004 17:05:24 GMT -5
allright i have been working on a zelda cbs i have the attack animation down and how to make the enemy attack the character in an action script. Can some one help me (do not give me the scripts i must figure this out with out scripts) on how to make a party detection. like if Link is near an ogre the ogre will come near him and attack. but if link is away from the ogre lets say a couple of steps the ogre doesn't come near him.
if you can help me with this this will be great.
|
|
|
Post by Dungeon Warden on Oct 19, 2004 8:58:30 GMT -5
I tried to do this in my game but was not completely successful. I believe it is because I have the caveman walking around. If you are going to have the ogre standing still (or are willing to risk this method not working while the ogre moved around) give it a try.
All you need to do is create a series of events that stay in the ogres line of sight. If the ogre moves, the events need to move with him. I found that touch seems to work better than equal, so I set all the events to touch and used the silver coin as the model. I put a script in the motion slot that reduced the coins in size and the rest of the script mimiced the movements of the caveman so the coins would follow him around.
The problem is that while the coins are moving from one square to the next, they can't be touched. It is only when they are fully in a square that the party can interact with them. When the creature is not moving, this works fine; but if the creature is moving, the party can move between the coins and escape detection.
D'oh. I just had a great idea. Instead of moving the coin events at the same speed as the caveman, I should have moved them directly to the next square and then waited for the caveman to catch up. i.e. instead of Event: Move : direction [north], 1 step, 30F per step , you can use Event: Move : direction [north], 1 step, 0F per step, Wait 30 F. This would solve the problem.
Good luck with your Zelda CBS
|
|
|
Post by NASH7777 on Nov 13, 2004 19:02:43 GMT -5
Oooh I can help you!!!
There must be in the enemies action script a loop, now ion this it will check certain conditions. I trust you know how to check the distance... So in the script have it when the distance is w/i whatever # you want it will move one closer. this 1 closer should be a called script. I will also trust you can script all this being as how you said you didn't want us to write any scripts for you. After enemy is so close have it do an attack. So loop movement, if far away nothing:if close move coser: if really close attack, wait 30 check other conditions like if enemie's stunned etc.. then loop back up. ;D Hope that helps some what
|
|