Alice Community  

Go Back   Alice Community > Alice 2 > How do I...?

Reply
 
Thread Tools Display Modes
How to make a character do a sentinel loop and attack when within range
Old
Razor_Gunn_Khillion
Guest
 
Status:
Posts: n/a
Wink How to make a character do a sentinel loop and attack when within range - 09-29-2007, 08:24 PM

Hello all I would like an enemy character to walk between two points until my character comes into range then attack my character if my character moves out of range I would like the enemy character to go back into its sentinel loop.So far I can make the enemy character either do the sentinel loop or attack but not both how can I do both? Thanks in advance!
   
Reply With Quote
Old
Ping
Guest
 
Status:
Posts: n/a
Default 09-30-2007, 12:15 AM

Quote:
Originally Posted by Razor_Gunn_Khillion View Post
Hello all I would like an enemy character to walk between two points until my character comes into range then attack my character if my character moves out of range I would like the enemy character to go back into its sentinel loop.So far I can make the enemy character either do the sentinel loop or attack but not both how can I do both? Thanks in advance!
Loop: infinite
[
if *your char* distanceTo *enemy* >= however close you want them.
[
enemy turnToFace pointOne duration=whatever
enemy moveTo pointOne duration=whatever
enemy turnToFace pointTwo duration=whatever
enemy moveTo pointTwo duration=whatever
]
else
[
enemy turnToFace *your char* duration=whatever
enemy.Attack (class-level method)
]
]

hope that helps you. sorry for it being so rough its 1:15am and im just checking the forums before i go to bed. just got back from a lan tourn.
   
Reply With Quote
found out myself
Old
Razor_Gunn_Khillion
Guest
 
Status:
Posts: n/a
Default found out myself - 09-30-2007, 02:08 PM

Found out myself not long after I posted your method works so thanks my method will have the enemy character do his sentinel loop until I come into range then he'll stick to me like glue I cant shake him so I guess thats what I want now I have to make up a health bar for the enemy so when it gets low he runs away.
   
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Copyright ©2023, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.