robolab's Forum Posts

  • I can't even install the plug-in. I have the newest version of C2 and yet I can't drag and drop the C2Addon files.

  • You do not have permission to view this post

  • People are going to ask for screenshots or a .capx or a better explanation. Is this a top-down game? Platformer? What kind of behavior does this Sprite have?

    Assuming it's a top-down game, you can add a Line-of-sight behavior to the Sprite, and when it has a line-of-sight to whatever target you want, have a set of events happen, such as running faster.

  • I think this answer would differ for online versus single player. Online would be running on a server naturally, so as you build the game to be online your issue wouldn't be present.

    Single player I don't think is possible to run unfocused or in background.

  • I don't yet have a solution. I did look around, though, here are some things I saw. Let me know if they are not things to worry about or if they may be clues?

    Check the animation frames of the Knight. Half of them are tightly drawn around the sprite, the other half are the entire sprite box. This COULD lead to your issue, but I don't think this is it, since you are both using the Defend animation during defending (obviously) and also it looks like you're using PlayerBox to check collisions anyway.

    One thing I want to do is make the red PlayerBox visible so we can see if it's behaving properly the whole time.

    ^^Okay, I did that. That seems to be working fine. Although I'm not sure if it's changing it's size suddenly in between a frame so we can't see it.

    I'm sort of typing as I check things out in case others want to jump in on this.

    Now I'm suspicious that the Droidwalkers are the main culprit. I couldn't figure it out, but the (Robot overlapping Playerbox) hit is being triggered BEFORE the (On shield collision with robot) event even begins. Possibly one frame before. I know this because I gave the Robots an instance variable called "BeingBounced", and on Shield collision I set BeingBounced to "Yes", and after the 0.3 seconds, back to "No"

    Then I set the Robot overlapping playerbox conditions to INCLUDE BeingBounced = "Yes" and it STILL happens. So it's safe to say that it's Overlapping the playerbox before it even registers a collision with the shield.

    Sorry I couldn't figure it out. Hopefully I gave some clues.

  • I didn't download the .capx, but the GIF shows them only getting through when you're facing the left. Does it only happen when you're facing the left? Or does it happen in both directions?

    --

    Also, I'm suspicious of that Wait 0.3 Seconds to set Defend to False. Let me download the capx

  • This is really great and I will definitely be referring to this- thank you. I do wish I could use the Turret behavior, though, as I wouldn't be able to replicate predictive aiming.

  • Post a capx, I'll try to help

  • You probably imported frames and forgot to delete the empty frame which is probably at the end of your animation. Check your animation and delete any empty frames?

  • Put the object into a Family, so you can reference the Targeter & Targetee.

    Use Pick by comparison (Targeter), where Team=1, Foreach, Pick by comparison (Targetee), where Team=2, Pick random instance. Have Targeter target Targetee.

    Do the opposite for Team=2, targetting Team 1.

    Hey, thanks for answering!

    I'm going to go ahead and give this a try in case I'm misunderstanding, but I don't think I comprehend the logic behind your conditions/actions. My intended outcome is to have MANY SpaceFighters on Team 1, 2, and possibly 3 and 4, and have the SpaceFighters target either nearest or first-in-range enemies. Would your suggested solution accomplish this? I guess the "pick random instance" is throwing me off.

    When I can, I'm going to try out your suggestion anyway.

    Thanks for responding btw, I spent an actual 4 hours trying to figure this out.

  • Going to try to get attention on this...

    One band-aid solution was

    Condition:

    On Target Acquired check to see if it was on the same team, and if it was,

    Action:

    Unacquire target.

    However, this led to the SpaceFighter targeting & untargeting itself and its allies 100 times per second with the off-chance that it will target an actual enemy.

    This solution is not good enough. Does anyone have a workaround for me besides duplicating the objects? I plan on having 4 players, 6 races, and 20 units each race. That's 120 objects-- if I have to make each object 4 times, that's 480 objects (and behaviors, effects, etc). I can't do that.

    Thanks guys.

  • I'm now having this issue, too. I really don't want to have to duplicate each object type for each player. With 6 races and 20 units each, that means I'll have to have (for 4 players) 480 objects (3/4 of them redundant duplicates...) as opposed to 120...

    Is there a work-around? I'll be a bit surprised if there isn't.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I think I'm having a similar problem here: https://www.scirra.com/forum/making-turrets-target-objects-based-on-team-instancevariable_t166138

    I can't figure it out. Any ideas?

  • I have a problem.

    I have a game with many units, but each unit has an instance variable called Team which marks what team they are on.

    In this example, it's a space ship called SpaceFighter-- this is only one Object type. I do not want to clone this object type or make a duplicate object type, I want to do this using instance variables. There's two teams. Team 1 and Team 2.

    So there's two SpaceFighters.

    SpaceFighter 1 : Team = 1

    SpaceFighter 2 : Team = 2

    They fly around and also have a Turret behavior, it's great. However, adding targets has proven to be difficult.

    I obviously only want SpaceFighter 1 to target objects on Team 2 and not it's own team (Team 1), but I'm not sure how to do that.

    Does anyone have any ideas?

  • This is an old post, but I believe I'm experiencing this issue right now. If it's by design, it's flawed design, what is the workaround? I'm trying to have turrets only target objects on teams other than it's own team.