0 Favourites

Ghost Shooter - Procedure to Turn Off Speed Pursuit

This forum is currently in read-only mode.
  • 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

  • Thread moved to Help/Tech

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

    Yes. Create a new event that reads like so:

    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.
  • 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

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • 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.

    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

  • Another thing I noticed when I "Run" the level is that it starts with the "Player" letting off a single round, by default.

    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.

    It also appears that some of the monsters start moving at the "accelerated" speed, without being struck by a bullet. Is this a bug?

    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.

  • 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

  • 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:

    Now, no more excuses! If you want help, you need to help us help you.

  • DeadEye:

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

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

    Greg Smith

  • 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

    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

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

    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.

  • Lucid & DeadEye:

    Now how did that happen? Thank you for being that "extra" set of eyes. Stuff like that can drive you mad, if not caught. And, I'm sure no debugger in the world would catch that one.

    It's been a long exercise, (and I'm still not done yet), but there is a lot in this tutorial to absorb.

    I did have one computer "freeze" while using Construct, (had to do a "hard" shut down) - this only worries me a little.

    Thank you,

    Greg Smith

  • Now how did that happen?

    When you define a new Private or global variable you can set the default value which means that when a new instance of that object is created it will automatically have that value. You can change individual value of the instances of an object in the layout editor but any instances made at run time will have the default value.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)