aegisrunestone wrote:
Okay, I'll try that.
BTW: How do you edit posts?
You can't, since you're a New Scratcher. When you become a Scratcher, "Edit" and "Delete" links will appear next to "Quote" and "Report" on your posts.

Offline
What Greenatic said
Like before post here if you have more problems or if you can't work out a fix; I'll try to get to it as soon as possible.
Offline
Okay. I'll do that. Thanks for answering for my question.
I'll try working on it when I get the time.
Offline
I tried swapping it to an "or" statement instead of an "and," and while he starts to chase Ezio, he moves very slowly.
http://img805.imageshack.us/img805/2063/acguardenhanced.gif
Offline
See what you mean; just tried it...I'll see if I can get to it
EDIT: FIXED IT. SOLUTION BELOW
The problem is that your When I Receive Chase code has a forever block. Don't put forever's in broadcasts, generally - at least not for this.
Remove the bit of the code that says if distance = 0 or Dsitance to Ezio > 100 and everthing inside it.
Then take the stuff out of the forever block and put it in a repeat until block.
for the condition for the repeat until put Distance to ezio > 100.
How it should look:
when I receive [Chase v] repeat until <(distance to [Ezio v]) > [100]> if <touching [MazeMainLevel v]?> move [-10] steps wait [1] secs end if <<(Detected) = [1]> or <(distance to [Ezio v]) < [100]>> point towards [Ezio v] move [2] steps end end glide [2] secs to x: [-164] y: (y position)Note that that code isn't perfect but its a quick fix based off of the existing stuff. The only problem you might have is actually it moving too fast lol. To solve that just put a wait 0.05 secs block in the if detected = 1 section, though.
Last edited by BetaSmozzick (2012-04-26 19:03:56)
Offline
Make a distance to Ezio variable. Have a constant "when flag clicked, set Distance to Ezio (variable) to distance to Ezio (sensing block)
Then, have an if___else___ script using the variable to sense whether or not the guard detects Ezio and moves towards him.
Note: make sure Ezio's movement steps are faster and greater than the guard's so he can escape the guard's attention.
Offline
Think the stuff above is already implemented. And I can't see why you would want a distance to Ezio variable when you have the actual distance to Ezio block.
Offline
aegisrunestone wrote:
I'm making a game with detection. The guards move around randomly until they detect you.
It works, except that the guard bypasses ALL the walls, and gets to you within .5 seconds; he basically blazes across the screen.
I need help. I'll show you the script I'm using for detection:
Yes, I know, it's an AC game.I don't plan to sell it nor share it, I'm doing it for a class.
Offline
? Just to show the images?
Offline
BetaSmozzick wrote:
See what you mean; just tried it...I'll see if I can get to it
EDIT: FIXED IT. SOLUTION BELOW
The problem is that your When I Receive Chase code has a forever block. Don't put forever's in broadcasts, generally - at least not for this.
Remove the bit of the code that says if distance = 0 or Dsitance to Ezio > 100 and everthing inside it.
Then take the stuff out of the forever block and put it in a repeat until block.
for the condition for the repeat until put Distance to ezio > 100.
How it should look:when I receive [Chase v] repeat until <(distance to [Ezio v]) > [100]> if <touching [MazeMainLevel v]?> move [-10] steps wait [1] secs end if <<(Detected) = [1]> or <(distance to [Ezio v]) < [100]>> point towards [Ezio v] move [2] steps end end glide [2] secs to x: [-164] y: (y position)Note that that code isn't perfect but its a quick fix based off of the existing stuff. The only problem you might have is actually it moving too fast lol. To solve that just put a wait 0.05 secs block in the if detected = 1 section, though.
That works! The only problem is when I enter a haystack and press the space bar, it activates the "Chase" broadcast. I'm not sure why this is.
http://img338.imageshack.us/img338/3007/haystackscript.gif
Note: this script is in Ezio's Sprite. For some odd reason, when I hit the space bar, it activates "chase" on the guard.
Offline
Anyone?
Offline
Well, I tried checking for anything that activates "Chase," but it's only on the guard. Any suggestions?
Offline
... anyone?
Offline
aegisrunestone wrote:
Update! (I wish there was an edit button)
There is an edit button. It's at the bottome of each of your posts and is between delete and quote.
Offline
I'll check this out shortly; didn't know you were still having difficulties.
It's worth pointing out that aegis is a new scratcher and so cannot edit their posts.
Would it be possible for you to publish it again aegisrunestone? Not sure how up to date my version is.
Last edited by Smozzick (2012-07-30 10:04:27)
Offline
Is it still due? Your first post about this was 3 months ago, most school projects are due before that. Plus, it's summer. About your problem, I would check out your haystack script and see if it's there.
Offline
zubblewu wrote:
Is it still due? Your first post about this was 3 months ago, most school projects are due before that. Plus, it's summer. About your problem, I would check out your haystack script and see if it's there.
Oh, I already turned it in. Me and my partner got an A because we went beyond the call of duty, so to speak.
I just want to perfect it.
Smozzick wrote:
I'll check this out shortly; didn't know you were still having difficulties.
It's worth pointing out that aegis is a new scratcher and so cannot edit their posts.
Would it be possible for you to publish it again aegisrunestone? Not sure how up to date my version is.
What do you mean "publish"? Do you mean submit to the website, or just upload it somewhere?
Offline