caiorosisca's Recent Forum Activity

  • If I got what you want, you should just use one invisible object for the logic (AI) and another one with the graphics pinned above it, for position only, this way the angle won't change.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • This is the solution I have in a game I made.

    I have an instance variable on it called ID, and I have also a variable let's say "Variable1", when spawning an object I set object.ID to variable1, and add 1 to variable1.. This way all the spawned objects will have IDs like 1...2...3...etc, then you can use Pick by comparison object where object.id equals whatever id you want.

    Also for a TD game, I would think you needed to click the tower to upgrade it, so maybe you can pick the instance by overlapping point using Mouse.X and Mouse.Y

  • Michaelb how would you go about coding that avoidance? As I'm using the MoveTo behaviour I feel I'm a bit limited on what I can do. If you got the time please have a look at the capx

  • You can delete your topic by editing it, there's a check box 'Delete topic'

  • Hi, I'm working on a simple racing game, and while trying to make some collision between the AI I ran into some problems.

    Just so you know I'm using 2 plugins by rewrainbow, "MoveTo" and "PushOutSolids", those can be found here:

    http://c2rexplugins.weebly.com/rex_moveto.html

    http://c2rexplugins.weebly.com/rex_pushoutsolid.html

    Move to is used to make the ai cars move around the track, and PushOutSolid I'm trying to use for collisions, adding Solid and PushOutSolid behaviour to the AI controled cars seemed to be the best option so far.

    The problem I'm having is that sometimes the AI get stuck and stop moving. I'm still not too sure about what is happening.

    It's fine if them bump into each other or even have a little bit of overlapping, I just don't want them to completely run over each other.

    I'm looking for any tips on how to improve collisions, different approachs are also welcome.

    Below is the current capx I'm working on.

    Stuff to look at:

    AICar object (collision polygon and behaviours)

    AI eventSheet (makes everything move)

  • Thanks Minor, I managed to get the picking system working like I wanted. I just needed a break, as I thought it wasn't as hard as it was looking.

    Anyway I still have problems with the collision and cars getting stuck, I'll open another topic to discuss collision options as it's outside the main topic here. if you get the time please have a look at it as I know you also use the MoveTo behaviour.

  • Hi, I'm working on a simple racing game, and while trying to make some collision between the AI I ran into some problems.

    The problem I'm having is that sometimes the AI get stuck and stop moving. I'm still not too sure about what is happening, I'm trying to avoid that making the ai cars choose different paths along the track, so they avoid a bit of collision.

    My track is set up like this, each waypoint is in fact subdivided in 3 (Waypoint object has 3 variables, number, path and taken). Number goes as usual, 1..2..3 until the track finished, path ranges from 0 to 2, 0 means inside part of the track, 1 means middle of the track and 2 means outisde.

    What I'm trying to do is to make the car choose only Waypoints that aren't "taken". For some reason I'm stuck on this, I'm realy struggling trying to set it up in Construct,

    something like this:

    while(pickedWaypoint.taken) pick another one.

    The real problem is more speficly in the AI event sheet, events 11 and 12 in case someone wants to help.

    Any tips on how to make better collisions are also welcome.

    Edit: Problem solved using sub picking events, 1st I pick every Waypoint with the desired number, then I pick again all the ones that aren't taken and then I pick a random one within them.

  • I solved the problem creating instance variables (id) for the family and the AICar object, the I run a for each loop on AICar, and pick family where Family.id equals AICar.id, but my doubt remains, could I have used uid or iid for it? How do they work?

  • I have 1 sprite called AICar, this is the car with the racing logic in my game.

    Then I have a family with all the other cars possible sprites, I select one of the family members and create it so it stays over the object with the logic and replaces it with a cool drawing

    The problem is that I need to set the correct animation depending on AICar's angle of movement. How can I link each "coverSprite" to their respective AICar object, they are all create dynamically in a loop until now. Can I use UID or IID for it? I've never messed with them.

    So far all "coverSprites" change their animation in relation to the same AICar object. (not sure if 1st or last one created)

  • You can add the platform behaviour to your npc, for moving I sugest you download the behaviour called MoveTo, by rexrainbow. For waiting use System> Wait action. For jumping you can use, Platform> simulate jump action.

  • I haven't used it yet, but look for containers, it might solve your problem.

  • I don't know if you can do that by code, I've seens posts about this "cursor" before, use the search option and look for something related to typewriter

caiorosisca's avatar

caiorosisca

Member since 20 Jan, 2014

None one is following caiorosisca yet!

Connect with caiorosisca

Trophy Case

  • 10-Year Club
  • Email Verified

Progress

11/44
How to earn trophies