Multi-way combat

Discuss all aspects related to modding Zandronum here.
Post Reply
Lollipop
Zandrone
Posts: 1124
Joined: Tue Jul 24, 2012 10:34 am
Location: Denmark

Multi-way combat

#1

Post by Lollipop » Sun Jun 16, 2013 4:55 pm

Hey, I have been messing with this deal all day, and I am not able to find out how I can do this.
I basically want a coop/survival style game where there are custom monsters set on 4 teams.

I have tried thing_hate through acs, but the thing is that they cant hate multiple targets at the same time, which is a problem.

the reason why thing_hate dont work is because the hate targets overwrite each other and do not work alongside each other on the same hater, so if they are finished with their last specified target, they ignore the rest of the enemies.

I would be happy for any supplied help :)
Combinebobnt wrote:i can see the forum league is taking off much better than the ctf ones
GalactusToday at 1:07 PM
are you getting uncomfortable jap
feeling something happen down there

Zupoman
Forum Regular
Posts: 110
Joined: Tue Jun 26, 2012 6:30 pm

RE: Multi-way combat

#2

Post by Zupoman » Sun Jun 16, 2013 5:41 pm

Thing_Hate can be used from DECORATE, just telling that to you, if you didn't know that.

Of course a monster can't have multiple targets. Target is a thing that monster actively attacks, and monsters that swap targets all the time sounds like nonsense. A target queue? No shit sherlock, why use "precious" memory when you can just select a new target after the monster is done with its current one. Also what if the new target is suddenly far, far away? That does not make any sense to me.

Sorry for my blabber. Custom monsters set on 4 teams? I'd recommend looking at ZDoomWars source code, it is all about monsters in different teams attacking each other, and it does it pretty damn well.
This signature is empty and useless, I would write another useless idiotism here but people will call me a noob for that, so sorry, no more signatures for you. Go somewhere else.

Lollipop
Zandrone
Posts: 1124
Joined: Tue Jul 24, 2012 10:34 am
Location: Denmark

RE: Multi-way combat

#3

Post by Lollipop » Mon Jun 17, 2013 8:57 am

1. I did not know thing_hate worked from DECORATE, thank you :)
2. The idea is to have them automaticly attack when an enemy is in sight, the idea is not to have them chase each other across the map :\
3. ZDW is no help, as the monsters attack each other because they belong to the player who made them, he shoot a projectile creating the monster, which makes the monster automaticly belong to him. A thread on zdoom forums said so.

Thank you for your ideas though :)
Combinebobnt wrote:i can see the forum league is taking off much better than the ctf ones
GalactusToday at 1:07 PM
are you getting uncomfortable jap
feeling something happen down there

User avatar
Mr. Repo
 
Posts: 82
Joined: Mon Jun 04, 2012 9:00 pm
Location: Los Angeles
Contact:

RE: Multi-way combat

#4

Post by Mr. Repo » Tue Jun 18, 2013 1:37 am

Lollipop wrote: 3. ZDW is no help, as the monsters attack each other because they belong to the player who made them, he shoot a projectile creating the monster, which makes the monster automaticly belong to him. A thread on zdoom forums said so.
Not true for team game modes. See without having some kind of property to set which team a monster belongs to, as soon as a monster hit another monster (or player) with fire there would be infighting amongst everything on the field.

http://zdoom.org/wiki/actor%20properties#DesignatedTeam

This is what ZDoom Wars uses to prevent said infighting and should be exactly what you're looking for here.
Last edited by Mr. Repo on Tue Jun 18, 2013 1:37 am, edited 1 time in total.

Lollipop
Zandrone
Posts: 1124
Joined: Tue Jul 24, 2012 10:34 am
Location: Denmark

RE: Multi-way combat

#5

Post by Lollipop » Tue Jun 18, 2013 11:53 am

I tried that, don't work for coop/survival gamemode :(
Combinebobnt wrote:i can see the forum league is taking off much better than the ctf ones
GalactusToday at 1:07 PM
are you getting uncomfortable jap
feeling something happen down there

Virtue
 
Posts: 82
Joined: Wed Aug 01, 2012 1:52 pm
Location: UK

RE: Multi-way combat

#6

Post by Virtue » Thu Jun 27, 2013 4:53 pm

have the monster constant flip between friendly and not friendly using the A_changeflag action, thats how i got it working in my Aliens special edition TC.

like this:

Code: Select all

Spawn:
    PLA3 A 0
    SENT A 0 A_changeflag("friendly",0)      
    PLA3 A 10 A_Look
    SENT A 0 A_changeflag("friendly",1)       
    PLA3 A 10 A_Look   
    loop
  See:
    SENT A 0 A_changeflag("friendly",0)  
    PLA3 AAAAAA 1 A_Chase
    SENT A 0 A_changeflag("friendly",1)     
    PLA3 BBBBBB 1 A_Chase
    SENT A 0 A_changeflag("friendly",0)     
    PLA3 CCCCCC 1 A_Chase
    SENT A 0 A_changeflag("friendly",1) 
    PLA3 DDDDDD 1 A_Chase 
    loop
Last edited by Virtue on Thu Jun 27, 2013 4:53 pm, edited 1 time in total.

Lollipop
Zandrone
Posts: 1124
Joined: Tue Jul 24, 2012 10:34 am
Location: Denmark

RE: Multi-way combat

#7

Post by Lollipop » Thu Jun 27, 2013 5:16 pm

ok, I will try that out tomorrow, I dont have time today, I will edit this post when finished testing.

EDIT (after long time): I got this working proberly thanks to virtue, I had to download your file and look in it, because my monsters just ended up being stuck at looking at each others (as ijon predicted).
I looked into the files and I got it working, it seems to work just as I hoped for, at least for now.
Last edited by Lollipop on Thu Jul 11, 2013 1:46 pm, edited 1 time in total.
Combinebobnt wrote:i can see the forum league is taking off much better than the ctf ones
GalactusToday at 1:07 PM
are you getting uncomfortable jap
feeling something happen down there

HexaDoken
Forum Regular
Posts: 352
Joined: Wed Jul 04, 2012 8:27 am
Location: Void. Russian Void.

RE: Multi-way combat

#8

Post by HexaDoken » Sun Jun 30, 2013 6:25 pm

Eh.

Ignore all of the above because it's shitty.

Make use of A_GiveInventory, A_TakeInventory, A_JumpIfInTargetInventory and A_ClearTarget functions. Give an inventory item to each team, item corresponding to team. Have monsters of the team check their targets for the item of their team via A_JumpIfInTargetInventory. If the target has the item, use A_ClearTarget so the monster will target another monster instead.

Granted, this is imperfect. Zandronum does not really allow you to control AI that much so don't expect this to work flawlessely.

Ijon Tichy
Frequent Poster Miles card holder
Posts: 901
Joined: Mon Jun 04, 2012 5:07 am

RE: Multi-way combat

#9

Post by Ijon Tichy » Sun Jun 30, 2013 7:54 pm

HexaDoken wrote: Eh.

Ignore all of the above because it's shitty.

Make use of A_GiveInventory, A_TakeInventory, A_JumpIfInTargetInventory and A_ClearTarget functions. Give an inventory item to each team, item corresponding to team. Have monsters of the team check their targets for the item of their team via A_JumpIfInTargetInventory. If the target has the item, use A_ClearTarget so the monster will target another monster instead.

Granted, this is imperfect. Zandronum does not really allow you to control AI that much so don't expect this to work flawlessely.
Won't work. A_Look(Ex) will just grab the same target over and over and over again.

HexaDoken
Forum Regular
Posts: 352
Joined: Wed Jul 04, 2012 8:27 am
Location: Void. Russian Void.

RE: Multi-way combat

#10

Post by HexaDoken » Mon Jul 01, 2013 9:25 am

It actually works for me.

Well, mostly.

Okay it works like only half the time which is far below ideal.

Still better than nothing.

Post Reply