More Families/LOS Questions...

This forum is currently in read-only mode.
From the Asset Store
A collection of various zombie characters sprites for creating a 2D platformer or sidescroller game
  • Hi,

    I've posted this awhile ago as well, but I wasn't able to find a permanent solution or the cause of the problem. Basically, I've been making a open world space game, in which there is a couple of factions battling for control of the galaxy. The problem I'm having is that objects (ships) seem to ignore certain events, and it seems more common when the LOS events take place, and when I try to use families instead of individual objects.

    What I want is for the "Bounty Hunter" craft (BOUNTYHUNTERfrigate) to automatically chase down the closest pirate craft (pirates and bounty hunter craft spawn on non owned planets randomly). There is three types of pirate craft (corvette, frigate, battleship), and I've grouped them into a family, so I could just use one set of events for the whole lot instead of one for each object. After the Bounty Hunter craft comes into range (I'm using the Line of Sight behavior) of any in the Pirate family of objects, it should stop (deactivate RTS movement) and every 300+random(300) seconds spawn a laser, which is then angled towards the closest pirate. After the pirate craft is destroyed, chase another. Unfortunately, this doesn't happen. Sometimes the Bounty Hunter craft do what they are meant to, but most of the time they either completely stop permanently, or just continue moving towards the pirate ship, not firing or stopping. I think they are completely ignoring the "Deactivate RTS Movement" when "Has LOS to Pirates" event.

    Could somebody please go through the CAP, and check the last two groups of events? Does the problem lie within using Families or the LOS behavior? If so, what else could I use to control the bounty hunter craft the same way (chase, stop, shoot, destroy, move on...)? Please help!

    CAP:

    http://www.mediafire.com/?1cc3ox9b43xkt99 (3MB, r.1.2)

    Note: Sorry for it being such a big CAP, and it's kind of complex as well... thanks in advance to anybody who could help!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Frist of, why not to use dropbox instead of regular file uploaders? with drop box you can easly keep track of your uploads, you have more space, no bandwiths, and easier uploading method not just for regular files but also pictures. and if you use this link http://db.tt/W9ytkDi you will get and extra +250MB space(and as a matter of fact i wil also ). Plus - you can create a shared folders which then will act as a internet hard-drive.

    2nd

    First ive replaced LOS with compare>distance event to ensure it is not LOD thats cousing the problem. Nothing changed

    Then i reorganised the sheet a bit.

    Then temporarly disabled the whole moving to see if theres no other event mixing with the main one. and it was clean.

    So going to next step - fammilies (which are the culprit most of the time). I have replaced setting "move to pirates" with "move to PIRATEcorvette".

    And as a matter of fact it worked. But the lasers still wont fire.

    So i have replaced fammily again with current PIRATEs memeber but it didng work neither.

    And so now you have a buddy in confusion - as when i look at the event sheet, it all should work just fine. But it isnt.

    Sorry to say we have to wait for someone PRO enough in this to find the solution.

    EDIT:

    jsut an idea which sadly i dont have timeright now to check myself but... Pirate fighters apears to work perfectly fine. They move, they shoot, they target. Maybe try and mimic their event controls into Bountyhunters?

  • Hmmm... the fighter controls were also an issue from awhile back, and still are... the fighters themselves are simply a bullet+turret behavior, and they work. It just seemed to be the actual ships that should launch them, as they often failed to launch them at all (the pirates work, not the alliance though :\). I could use that same combination in the Bounty Hunters, except that it doesn't create very realistic movement, and I wanted a more "capital ship" feel to it.

    My theory is that Construct gets mixed up with multiple instances of objects. For example, when I was trying to perfect the fighter spawning AI, often when a single Alliance family member becomes in LOS of a Pirate, every single Alliance ship on the map would spawn fighters instead of the one. Whats annoying though is that the Pirates work correctly, and yet the Alliance doesn't, but I've got both events set up identically!

    And yes, I was going to use Drop Box, but I haven't got around to setting it up yet...

  • Well any behavior as far as i remember can be overwriten with events.

    I remember - before discovering "car" beh for spaceships - i used bullet beh + variables and switches.

    basicly the ship had 3 extra PV's. one for X, another for Y and the last for "on/off".

    first two PV had value set on X/Y position of the ship when the last one was the event triger.

    so when you pushed "space" it switched last PV to 1 (else = 0)

    When PV ON/OFF was 1 it gone like this:

    triger once

    set PV X = getShip.X

    set PV Y = getShip.Y

    then

    always: set Ship X/Y to PV X/PV Y.

    It acted like a "hook" glueing the ship into the market spot.

    But i doubt this helps you in anything. I am just keeping our convo

    PS:

    just betwen you and me (and aparently anybody who would read this topic lol) i am looking at your game in fear - because i am constructing something very very similiar (fractions, top down space sim etc) and i wanted to use preety much the exact same controlers you are using. Now i am worried will i hit the same wall as you did right now ._.

  • No, don't let my game put you off! I'm still very much a beginner at Construct, and so my game most likely has many glitchy events that stop the whole thing from working. Also, I think a lot of my concepts need redoing anyway. By the sound of it, you definitely could do a lot better job than me...

    Is there anybody else out there that might be able to help me with this issue? I'm desperate to fix it as it's a game I have been working on for many months now, and it would really sting to have to cancel it or have to rework everything.

    EDIT: OK, after even more chopping out events to see what was the issue, I'm pretty sure it isn't families or LOS that's causing the problem. I've noticed that only a single "bounty hunter" ship on the map will carry out the correct events, (only one shoots and stops), and it seems random which one it is that does this. Is there a way I can make each object work independently when there is more that one instance of the object on the map?

  • It is the LOS it will only see the first instance of that object that you pick and then do the action.

    your event 85 look like this

    + BOUNTYHUNTERfrigate: Has LOS to PIRATEfrigate

    + System: OR

    + BOUNTYHUNTERfrigate: Has LOS to PIRATEcorvette

    + System: OR

    + BOUNTYHUNTERfrigate: Has LOS to PIRATEbattleship

    -> BOUNTYHUNTERfrigate: Deactivate RTS movement

    to make it work right change it to this

    + System: For each PIRATEfrigate

    + BOUNTYHUNTERfrigate: Has LOS to PIRATEfrigate

    + System: OR

    + System: For each PIRATEcorvette

    + BOUNTYHUNTERfrigate: Has LOS to PIRATEcorvette

    + System: OR

    + System: For each PIRATEbattleship

    + BOUNTYHUNTERfrigate: Has LOS to PIRATEbattleship

    -> BOUNTYHUNTERfrigate: Deactivate RTS movement

  • toralord, you're a genius! It definitely works better now, although sometimes they seem to "break through" and overlap the pirate...? Never mind, I'll fix that somehow.

    The last thing I'm having issues with is when the Bounty Hunter ships actually fire, the subevent under event 85? Only one seems to fire at a time, but I have set up the "For each BOUNTYHUNTERfrigate" condition.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)