Sushin's Recent Forum Activity

  • If Door is Open & Door.Width is greater than 0 -> Set Door.Width to (Door.Width - 50*dt)

    You can reverse this by setting a target width for it to grow to when the player toggles the door.

    Alternatively, instead of setting width, you can set the X or Y position of the door so it slides instead of shrinks.

  • You should make an animation manager. They all have to be in a sort of switch case format to work properly for each sprite.

    For instance;

    If X, play this animation,
    else if x, play this animation
    else, default to this animation.
    [/code:14yinab7]
    Every single animation for a family or sprite should be in here, otherwise you can have animation glitches on your sprites. Using the "Else" event condition will assure that only one can happen at a time.
  • The "pick random instance" event in the system object. If they are different sprites, put them all in 1 family and pick from that family.

  • Had the same problem with my buttons, which are basically the same as yours except I use an effect, but I fixed it like this:

    Cursor is over "Button"

    ----> Pick all "Buttons" : Disable Effect

    ----> Pick "Button" nearest to Mouse.AbsoluteX, Mouse.AbsoluteY : Enable Effect

    Cursor is NOT over "Button" : Disable Effect

    So what it does is, as you move the cursor over a button you start by removing all effects from any buttons, and then you apply the effect to the button nearest to the cursor.

    Thanks. That helps.

    How do you access the "pick nearest" event though?

    EDIT: Nevermind. It's on the object rather than inside of system.

  • You could also use the "Every X Seconds" event together with the On Space Bar Pressed event, it will work the same way.

    You can also use the "On Key Pressed" event, if you want the archer to shoot an arrow every time you press the spacebar, but don't want him to keep shooting while the bar is pressed.

    "Every X Seconds" doesn't work as well because the seconds are independent of any key press.

    For instance, if it's every 5 seconds, and you press shoot at the 4th second, you can shoot once then, and after a second, you can shoot again.

  • The safest way to handle text in Construct 2 from my experience is to use Sprite Font for everything.

    Alternatively, you can try adjusting the settings in events.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Using this code, when I hover over a button it gets bigger, but if I can move the mouse quick enough to another button (to not trigger the else command), the original button is still being highlighted, not the one that is being currently highlighted.

    With this modification, it makes it so that if you move from button to button without triggering the else statement, all the buttons you highlight get bigger.

    Basically, I just want it to work on the button being highlighted and only that button, one button at a time. Anything I can change to fix this?

  • Basically you use a variable to define whether the CapturePoint has been scored yet and such...

    But yeah, like others also mentioned you could simply fix it by using For each.

    Thanks for the advice. I ended up using a boolean that triggers if the base reaches 5 or -5 and resets when the capture point timer reaches 0.

  • As long as a single member of the CapturePoints family has a CaptureTimer value of <= -5 (or >= 5) the condition holds true, therefore it's completely correct how it behaves with trigger once.

    Try setting the CapturePoints sprite inactive or resetting it after scoring, maybe using an additional value.

    Oh. That makes sense.

    What do you mean setting it to inactive? And what exactly would I be resetting?

  • Could I see the event where you change the capturepoints.capturetimer?

    <img src="http://puu.sh/6RUqy.png" border="0" />

  • No luck. Any one else have an idea?

  • Can I see your capx file? I see your "trigger once" has sub events. It shouldn't. I would set it up like this:

    Team = 0

    -Timer <=5

    --TriggerOnce

    -Timer >=5

    --TriggerOnce

    Team = 1

    -Timer <=5

    --TriggerOnce

    -Timer >=5

    --TriggerOnce

    (PS: I'm assuming you need both conditions for less and greater than 5)

    Sent you a message

Sushin's avatar

Sushin

Member since 28 Feb, 2013

None one is following Sushin yet!

Connect with Sushin