jwoods's Forum Posts

  • off-topic (slightly). When I click a target it instantly shows if it was a hot or miss - how would i delay showing the target result until the two "seeker" targets disappear?

  • first release will simply be turn based, against AI (Constructs Random system expression), but depending on time, motivation and interest I might explore taking it further

    no doubt I'll need loads of help - thanks again

  • Sargas I sure am, and yes, will let you know when/if I finish. Mine has a little spin, it's a replica of Battle Cruiser from Space quest 5....

    I haven't gotten far yet (placing 2 ship types randomly on the board, but you can check out progress here

  • Yep, it sure does Sargas

    I cloned Target sprite object (SeekerX and SeekerY) and added a sub which executes every 5 seconds.

    thanks again.

  • Updated

    -----

    I've sorted it out - I moved the "Every" sub-event out as it's own event (no need for while) and it works. I don't know why it didn't work when it was a sub-event of the touch event.

    Thanks for your help Sargas

    -----

    Sargas, I'm having some trouble;

    • I created 2 clones of my target, one called SeekerX and the other SeekerY
    • On touching a target I create an object;

    - SeekerY (Target.X, starting y position)

    - SeekerX (starting x position, Target.X)

    This looks good so far, but now I have to move them to create the animation effect.

    So I add a sub event;

    • Every 2.0 seconds: SeekerX | Set X to SeekerX.X + 40

    When I run the game, the SeekerX object moves one block across, but no further...

    So I try a while loop;

    • While SeekerX.X < Target.X { SeekerX | Set X to SeekerX.X + 40 }

    The seekerX object instantly moves to the Target.X position.... too fast, need to slow it down

    So I combine the while loop with the delay (while SeekerX.X < Target.X { Every 2.0 seconds {SeekerX | Set X to SeekerX.X + 40) }} when I click a target nothing appears any the tab becomes unresponsive... I guess there is something wrong with my loop, but logically it seems to make sense.

    thoughts?

  • Thanks Sargas, I'm prone to over think solutions - this seems like a simpler way to achieve my outcome. I'll give it a go and report back on the outcome.

  • I have a simple board game, when I click a location on my board the area turns green.

    The board is created by placing 10*10 of 40x40px targets on the board for each reference (e.g. A 1, or C 5, etc).

    What I would actually like to achieve is to have each target from top reference point and from left reference point to flash in towards the clicked target, like in the image below;

    Any ideas on how to achieve this? Each letter along top or number down left side is an instance of a Sprite font... maybe some line of sight? I just can't think of how to do it.

  • Joskin I'm using the RTS Template, so File > New > Template: Real Time Strategy (RTS)

    nimos100 I'll work through this and let you know how I go, thanks for taking the time to write such a detailed answer

  • I'm using the RTS Template and have a have a tank (base sprite and turret sprite) and I want to limit the rotation angle of the tank turret. Currently it spins 360 on the base, I want to limit this so that it can only spin 130 degrees to the right or left (cannot do a complete 360).

    Can anyone suggest a way of doing this (I thought it might be a behaviour of the turret object, if it is, then it isn't obvious to a newb).

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • caiorosisca Thanks for your suggestions, both lead me to the answer.

    To fix this;

    • I added another image point to the tank base On the 'On Created' event for the tank base I
    • Set the position of the healthbar components to new image point of the tank base
    • Kept the pin as Position & angle as that locked it to my bases angle and position
    • Added an action to set each healthbar component (sprite) to the same angle at the tank base (as suggested by

      suggested)

    I also had to play with the order of components, but it works great now.

    Thanks again for your help.

  • roracle i'll give it a go, i'm using a container now, but perhaps there is more 'batteries included' with C2 containers that i'm unaware of.

    how do I set the angle and position? The health bar is in a container with the tank and is also pinned to the tank, so when I "Spawn FriendlyBase on layer 0 (image point 0)" it all just appears....

  • I already do this as part of the "On create" event for the tank bases that exist initially when the game loads;

    I thought this would execute when I spawn a new tank?

  • Hello,

    I've added individual health bars to my units on the RTS template. This is working great, however when I spawn a new unit the health bar is't positioned correctly.

    Can someone suggest an approach to do this correctly, currently I am just;

    Spawn FriendlyBase on layer 0 (image point 0)

  • This looks really cool!

    I had some trouble scrolling up with my mouse (Chrome 33 on Win8.1) - but was able to use keyboard.

    Is there a tutorial on building isometric RTS? I'm currently playing with the RTS template which is top down.

    What did you use to create your building and character sprites?

    Anyway - this is super cool, keep it up

  • Thanks again Katala.

    I wasn't aware of the line of sight behaviour. Enabled it for my turret family and set the range. One simple event and I have the exact behaviour I was looking for, thanks.