Ghost Shooter - Procedure to Turn Off Speed Pursuit

For questions about using Classic.

Post » Sun May 31, 2009 9:28 pm

I've been working through the "Ghost Shooter" tutorial and added the optional event of increasing the pursuit speed of the monsters while the value of "Chase Timer" is greater than 0. I did this by adding a new "event" that triggers when the value of "Chase Timer" is greater than zero by increasing the monster's "Bullet" property speed. This would lead me to believe that as soon as the value of "Chase Timer" hits zero, the speed increase would revert, but I must be wrong about this.

It seems that, once hit by a bullet, the monsters do, indeed, increase their speed of pursuit, but once increased, their speed remains advanced and does not reduce once the "timer" value hits zero, (after 2 and 1/2 seconds).

Is there another event that must be added to insure that the original speed is reinstated?

Thank you,

Greg Smith
B
2
G
3
Posts: 25
Reputation: 900

Post » Sun May 31, 2009 9:57 pm

Thread moved to Help/Tech

[quote="Psmith":3e5sicau]Is there another event that must be added to insure that the original speed is reinstated?[/quote:3e5sicau]

Yes. Create a new event that reads like so:

[code:3e5sicau]
Condition: Chase timer Equal to 0
Action: Set monster speed to whatever
[/code:3e5sicau]

Remember, computers are stupid. They only do what you tell them to do. They are completely literal, so you have to be equally literal. If you skip a step, or put things in the wrong order, the computer won't be able to interpret your intentions properly, so be sure to mind your logic.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Sun May 31, 2009 10:19 pm

DeadEye:

Another thing I noticed when I "Run" the level is that it starts with the "Player" letting off a single round, by default. It also appears that some of the monsters start moving at the "accelerated" speed, without being struck by a bullet. Is this a bug?

And, thank you for the instruction.

Greg Smith
B
2
G
3
Posts: 25
Reputation: 900

Post » Sun May 31, 2009 10:27 pm

pSmith, it isn't just about stupidity though, it's also about power and control
you may want the ghost not to slow back down after the delay?, you may want him to go even faster
or maybe you want him to disappear, or you want the camera to zoom in on the ghost, or want to make him drop a coin and start the timer again, and drop a coin every 2 seconds that way

construct doesn't assume you want any certain thing, this means you can make your game do anything you can think of, instead if just the one option

EDIT:
[quote:2lsxcsww]Another thing I noticed when I "Run" the level is that it starts with the "Player" letting off a single round, by default.[/quote:2lsxcsww]
you probably have a bullet on the layout to begin with
this bullet behaves normally and fires in whatever direction it's facing
in the properties panel you can click Destroy on Startup, to make this first bullet not exist
or you can stick it off to the side outside your layout so it's not visible when it begins

I'm not sure this is what's happening without seeing your cap, but this is most likely
as for the other problem, I'm not sure why it's doing that without seeing the cap for myself
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

Post » Sun May 31, 2009 10:45 pm

[quote="Psmith":wcrvfqgh]Another thing I noticed when I "Run" the level is that it starts with the "Player" letting off a single round, by default.[/quote:wcrvfqgh]

Tick "Destroy on startup" for your bullet object in the Properties panel, under Attributes. I'll bet you a nickle that the first shot you see is actually the bullet object that is sitting in your layout, and when the game runs, it starts moving.

[quote="Psmith":wcrvfqgh]It also appears that some of the monsters start moving at the "accelerated" speed, without being struck by a bullet. Is this a bug?[/quote:wcrvfqgh]

It might be, but it's probably not. It sounds like an instance picking issue to me... in other words, a logical error in your events. Post your .cap so someone can take a look.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Sun May 31, 2009 11:26 pm

DeadEye:

I don't see a "built in" option for uploading a file, (cap file), so I assume I can only post a link to this file on my own server - is this correct?

To make sure that this was not an "instance" problem, I deleted all of the instances and left only one monster. I checked its properties and its initial speed is set to 50, but when "Running" the level, the monster starts moving, at accelerated speed, right to the "Player".

I don't currently have an easy way to upload files to a server, so, I'm sorry I can't provide you with the .cap file.

Greg Smith
B
2
G
3
Posts: 25
Reputation: 900

Post » Mon Jun 01, 2009 1:26 am

There are 176 million free file hosting services on the internet. I know, I counted them all.

Here's a short list:
http://www.box.net/ My favorite long-term host. Sign up for an account.
http://www.willhostforfood.com/ Kinda good, no account needed.
http://www.mediafire.com/ Kinda... not as good.

https://www.getdropbox.com/home <- My favorite short-term host. You can just drag files into your dropbox folder on your desktop and they automatically upload and sync with your online storage. Then you just right-click your file to get a link to post. Very useful.

Or you can upload your .cap to a thread in the Uploads forum:
viewforum.php?f=16

Now, no more excuses! If you want help, you need to help us help you.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Mon Jun 01, 2009 2:35 am

DeadEye:

Why are you so sure I'm looking for excuses? Here is the file I included in the "Uploads" section of the forum. [url:1s6jhzmm]http://www.scirra.com/phpBB3/viewtopic.php?f=16&t=3821[/url:1s6jhzmm]

Monsters begin moving at speeds greater than their default speed of 50.

Greg Smith
B
2
G
3
Posts: 25
Reputation: 900

Post » Mon Jun 01, 2009 2:55 am

your chase timer default value is 2.5
so it immediately calls the event

it was probably just a mistake,
but if not,
the default value is what it will be before anything sets the value to something.

To change the default back to 0:
make sure you're in the layout editor, and not the event sheet editor,
click on your ghost,
on the properties pane(leftmost pane with all the info)there's a private variables section,
there you can view and edit your private variables and their defaults. change it from 2.5 to 0, and it will work as expected
[size=75:2qedakin]
EDIT, on a side note, (from the other thread)DropBox is my favorite. it makes uploading really easy, you save to a folder on your computer, which automatically uploads it. And then you can go into that folder, and right click, and it copies a link to the file online into the clipboard, and you can paste it here. It literally takes a few seconds. makes uploading not inconvenient at all, which I can't really say about any other upload method I've tried [/size:2qedakin]
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

Post » Mon Jun 01, 2009 3:03 am

[quote:1kkuv2z4]Why are you so sure I'm looking for excuses?[/quote:1kkuv2z4]

It was a joke ;)

Anyway, lucid is right. Set the default value for the chase timer to 0 and it won't trigger at the beginning.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Next

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 4 guests