Lou Bagel's Recent Forum Activity

  • If you are doing system-global variable > instance.variable I don't believe it is picking any of those instances, so all are picked. If you do sprite instance.variable < global variable then I believe it would pick only those instances that are true.

    I would recommend though:

    on layout start

    -for each (menu)

    --if instance variable < etc etc

    ---then animate x

    --else; animate x

    I'm not entirely sure if that is necessary but is usually safer.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • My guess at the problem, despite very limited information:

    Are you using 'for each'?

    You probably have a 'picking' problem, as in picking all of them. Therefore it is applying it to all of them.

  • I get what you are saying, and that is fine if that is the way you want to do it. What I meant was one should always be disabled, thus not being used simultaneously. When enabling one then disable the other.

    My question still stands though—how familiar are you with path-finding? Disable the bullet behavior and debug the path-finding behavior. Use the debugger and a text box to figure out what is going on there.

  • I would recommend learning how to create a "state-machine" (I believe that is what they are called).

    So you would have an instance variable called "state" and depending on what that is corresponds with what he does. Timer behavior would be needed to go along with this.

    Example:

    If state = "right" then simulate right

    If state = "left" then simulate left

    If state = "idle" then idle animation

    On Timer

    -state = "left" or "right" then state = "idle"

    -state = "idle"

    --Choose(0, 1) > 0 then state = "left"

    --Else state = "right"

    Restart Timer

    This is the basics, if you want more states then just map out the order that they should move through states. For example one I've done for shooting zombies is idle -> aim -> fire -> recoil -> recover(just a pause) -> idle ... but from idle a different chain can occur such as move, reload, etc.

    Jumping at random intervals can be done as a state or separately with a timer. When setting state to left or right start the state timer and also a jump timer (can set to random time). On timer simulate jump.

    Edit: definitely add the "Else" where applicable in above commands

  • I don't believe it is recommended to use two movement behaviors simultaneously—and I don't believe it is usually necessary either.

    Disabling bullet behavior shouldn't affect path-finding. But bullet behavior automatically moves (when enabled, so at the start of the layout or when created, etc). So are you sure you had the path-finding working to begin with? Or was it just moving because of the bullet behavior?

  • Yeah you have the last version on the link so it's the version with no bug :p.

    But like i've said, i'm wondering if it's possible to do that : (Suppr the shift control and change the ship with just ctrl)

    Like when you press control it does one thing if shift is down and another if not?

    If so:

    On Ctrl pressed

    --Sub-Event: if Shift down; then yada yada yada

    --Sub-Event: Else; then yada yada yada

  • New aim bar and crosshairs! Also, added the new limp animation

    (anyone know how to resize the image in the forums so it will show all of it? I think its like img=size"" or something)

  • Working on a limp animation:

    Injured leg adds a little twist ....

  • The game graphics and mechanics look great. If the game is level based then you can just make each level harder and every 5th level make it some boss type a bigger verio n of the zombies you have. If its going to be endless the easiest way I know so you don't have to code so much is set the zombie speed to increase when your score reaches a certain number. Then set a system timer to release a boos or bigger zombie type every 60 seconds or so.

    Or if you want to go nuts and have some crazy fun with it make a flying headless zombie with this code

    System(every 3.0 seconds) FlyingZombieHead(set angle towards (Player.x,Player.y)

    That will throw players for a loop haha.

    Thanks for the comment. Yes, I am most likely going to do waves with strategy break in between. Haven't really spent too much time figuring out what I want yet.

    Funny thought on the flying head

  • : i heard about the lerp function and i will test your code too

    I made a sample capx to demonstrate lerp() — much easier to show all the events than to explain

    Should be pretty self-explanatory but let me know if you have any questions:

    Lerp() Tutorial

  • Fixed the first part (with boolean/shoot and stuff, perfectly working.)

    But, I still have a problem with the scoring. I've tried the else stuff and it's very complicated and I don't understand.

    So i've found an other way to do it. I've added variable named state into my laser and my asteroid. So when i want to score I compare the state of the asteroid and laser.

    So, if laser.state = asteroid.state then it adds +2 ; if it's not equal it adds +1. The +1 thing is working but not the +2.

    The good things is, I know why but I doesn't know how to fix it. When I press "shift" or "ctrl" to set the red/blue color to my ship it is supposed to change the animation of my laser and change the color, it works, but in the same event it's supposed to also change the state of my variable (putting 0 or 1 dependings of the ship color) but it's just never change and I don't get why. :/

    There is a screen of my even sheet and my capx there : drive.google.com/open?id=0B6phdwDtsxJkTXN1RnU3TUYyMDA

    I just tried it out and I got +2 when my ship was red and I destroyed a red asteroid and if my ship was blue when I destroyed a blue asteroid. Did you get it working?

  • Which part are you struggling on?

    I'm not 100% sure of details about objects/families colliding with one of their own but have seen several tutorials/threads on it.... here is one

    Once you get the 'picking' sorted out it should be straightforward, right?

Lou Bagel's avatar

Lou Bagel

Member since 7 Sep, 2015

Twitter
Lou Bagel has 3 followers

Connect with Lou Bagel

Trophy Case

  • 10-Year Club
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • x2
    Popular Game One of your games has over 1,000 players
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

17/44
How to earn trophies