SC2Mapster Forums

Development > Data

Make units/doodads block attacks from other units?

    #21 Feb 04, 2013 at 08:44 UTC - 0 likes

    Yea i suppose, this problem is really making me question continuing with the map, because this could cause major problems as i progress through making the map(it wouldnt be a problem if each player owned a single unit but that is not the case).

    #22 Feb 04, 2013 at 21:51 UTC - 0 likes

    I would resort to triggers that look for a footprint between the target and the attacker.

    Last edited Feb 06, 2013 by DrSuperEvil
    #23 Feb 04, 2013 at 23:21 UTC - 0 likes

    How would i do that?

    #24 Feb 05, 2013 at 00:22 UTC - 0 likes

    @Project_06: Go

    Have you thought about using realistic projectiles?

    Here's the one I started with. Kueken also has another method but I forget what the difference between the two were.

    Current Project: SquadCraft 2
    Project Page
    Feedback Thread
    Latest Video
    Published Regions: SEA, NA, EU, KOR
    Status: Open Beta

    #25 Feb 05, 2013 at 00:34 UTC - 0 likes

    Your first tutorial doesnt seems like it would help me at all, ive juts about given up on "realistic projectiles" because its so damn complex and i already made a good portion of the weapons in the map. The second tutorial is the exact one mentioned in earlier posts... please read this thread before you post something because you might just repeat what some one else said... and that is very irritating since ive nearly pulled my hair out trying to solve this.

    #26 Feb 05, 2013 at 01:12 UTC - 0 likes

    @Project_06: Go

    I understand you may be frustrated but I assure you I'm just absent minded at times XD. When I went into this thread from the forums page I thought this was the first page (especially with that very convincing first post). If you'd like I won't help out next time you or someone else needs it.

    #27 Feb 05, 2013 at 01:58 UTC - 0 likes

    Hmm, your comment sounds like sarcasm so ill just ignore it.

    Last edited Feb 05, 2013 by Project_06
    #28 Feb 05, 2013 at 02:12 UTC - 0 likes

    Nope, being dead serious. You do realise you're in a community with people nice enough to help others, which isn't a requirement. Also, not all problems anyone presents will be solved by those willing to help every single time (because either there is a lack of understanding of the problem or that it's too complex).

    Hopefully you'll understand and it's not my fault that you're having problems or are frustrated. That's all I'll say about this so the thread doesn't derail any further.

    Good luck with finding a solution.

    #29 Feb 05, 2013 at 02:34 UTC - 0 likes

    I know youre trying to help, but im used to people who just insult your intelligence when you cant solve something.

    #30 Feb 05, 2013 at 02:45 UTC - 0 likes

    In that case I apologize. I didn't mean to insult your intelligence.

    #31 Feb 05, 2013 at 02:52 UTC - 0 likes

    If you didnt intend on that then there isnt a need to apologize. Im now considering this thread close since i have two options which are to convert my walls into units and give every used weapon a launch missile/persistent effect which is ALOT of work, if i knew about this before i made the terrain and the weapons then i would have no problem with this, because there wouldnt be any converting involved. My other otption is to simply not do realistic weapons(which even i did this it wouldnt work the way i want it to) and right now that will be my choice until i have the willpower to do it.

    #32 May 03, 2013 at 07:15 UTC - 0 likes

    This may be reviving something long-dead. But I came across it while googling and I may have an idea.

    You said you already have a validator that successfully makes it so you can't attack if you try to target something through the wall, right?

    What if you could add something that gives the unit a move order when you target something in the room?

    You'd just need to make sure that the validator is working correctly, and that it doesn't stop you from attacking if you're in the same room as your target.

    EDIT: Or like DrSuperEvil said.

    Something like this perhaps?
    http://www.sc2mapster.com/media/attachments/38/807/order_move.png

    (You'll have to go through and rebuild the trigger yourself. This is a proof of concept.)

    Duplicate the stuff inside the NOT and the AND conditions for each region you're checking for.

    You're basically making sure the triggering unit is not WITHIN a region, and that its attack target is WITHIN the region. If so, you issue the unit a move order to the same place you tried to attack to.

    You may need to duplicate these conditions further to make sure units WITHIN the region can't attack units NOT WITHIN it.

    EDIT: You may have to manipulate it further so that it won't go off if the triggering unit and the target are on either side of the doorway.

    Last edited May 03, 2013 by Amaroq64
    • order_move.png
    #33 May 03, 2013 at 19:22 UTC - 0 likes

    I figured out a solution to this recently but it got very little attention. Here's the thread.

    The main disadvantage is that every weapon effect needs its own set of 3 validators. Also note that objects with footprints are treated like circles, so it doesn't work well with things like the huge diagonal debris walls.

    #34 May 03, 2013 at 20:57 UTC - 0 likes

    @QuantumMenace: Go

    Again people want missiles to launch and stop at footprints which your thread could not offer.

    #35 May 03, 2013 at 21:39 UTC - 0 likes
    Quote from Project_06: Go

    Aw, thats a shame because just about all of my weapons in the map DONT use missiles... There is no other alternative? Because thie shooting through walls thing really bugs me and a launch missile effect for every weapon would just suck. The wall doodads DO use a 1x1 footprint.

    EDIT: if i have no choice but to add a launch missile effect for every weapon, is it possible to avoid the trouble of adding missile actors, ammo units, and setting the stats for these would-be newly added effects/units? And just have the "invisible missile" travel instantly to simulate non-missile attacks but to have this realism added to it.

    He didn't want to use missiles at all.

You must login to post a comment. Don't have an account? Register to get one!