Author Topic: [Tutorial] Push Mode  (Read 7121 times)

Offline Lobo

  • Developer
  • ******
  • Posts: 736
    • View Profile
Re: [Tutorial] Push Mode
« Reply #15 on: 06-07-2009, 01:07:59 »
A small reminder

ObjectTemplate.onlyTakeableByTeam 2

The editor doesn't save this line, so you must write it manually in your GamePlayObjects.con each time you do a change to your objects

Offline [130.Pz]S.Lainer

  • FH-Betatester
  • ***
  • Posts: 1.934
    • View Profile
    • 130th
Re: [Tutorial] Push Mode
« Reply #16 on: 06-10-2010, 02:10:48 »
I seem to be failing.....Or maybe asking to much from push mode.

Code: [Select]
from game.plugins import plugin, push



   
push_64 = [
plugin(push, source = 'Seal_Cove', target = 'Bass_Harbor', attacker = 1),
plugin(push, source = 'Seal_Cove', target = 'Northeast_Harbor', attacker = 1),
plugin(push, source = 'Seal_Cove', target = 'Cadillac_Mountain', attacker = 1),
plugin(push, source = 'Trenton', target = 'Southwest_Harbor', attacker = 2),
plugin(push, source = 'Trenton', target = 'Sargent_Mountain', attacker = 2),
plugin(push, source = 'Trenton', target = 'Mcfarland_Mountain', attacker = 2),
plugin(push, source = 'Bass_Harbor', target = 'Seawall', attacker = 1), 
plugin(push, source = 'Seawall', target = 'Southwest_Harbor', attacker = 1),
plugin(push, source = 'Southwest_Harbor', target = 'Seawall', attacker = 2),
plugin(push, source = 'Seawall', target = 'Bass_Harbor', attacker = 2),
plugin(push, source = 'Cadillac_Mountain', target = 'Bar_Harbor', attacker = 1),
plugin(push, source = 'Bar_Harbor', target = 'Mcfarland_Mountain', attacker = 1),
plugin(push, source = 'Mcfarland_Mountain', target = 'Bar_Harbor', attacker = 2),
plugin(push, source = 'Bar_Harbor', target = 'Cadillac_Mountain', attacker = 2),
plugin(push, source = 'Northeast_Harbor', target = 'Jordan_Pond', attacker = 1),
plugin(push, source = 'Jordan_Pond', target = 'Sargent_Mountain', attacker = 1),
plugin(push, source = 'Sargent_Mountain', target = 'Jordan_Pond', attacker = 2),
plugin(push, source = 'Jordan_Pond', target = 'Northeast_Harbor', attacker = 2),
]

gpm_cq = {
  64: push_64   
}

  Now the code itself seems to be work just how I wanted.  The flag layout is basically 3 sets of 3 flags.  At round start the USA and krouts can rush for only 3 flags, getting that flag opens up the next one in the group until you get to the last one.  On the other hand if your side gets pushed right out of the whole mess the other team just needs to hold the starting flag for your team and the others are locked.  Your team can push from  one of the other flag groups if they have any flags there or come at it from main again (Seal_Cove and Trenton are the mains).

Like I said it all works fine in play just does not look right on the map.


As you get playing it all works itself out......(southern western group of flags.)



http://www.bfewaw.com/campaigns/waw24/promo/campaign/waw24banner1.png
The purpose of this deployment was to "annoy and defy the United States ... on her with Bofors 40 mm guns from a range of 650

Offline fh_spitfire

  • Developer
  • ******
  • Posts: 421
  • FHer since 0.6 | aka spitfire05
    • View Profile
Re: [Tutorial] Push Mode
« Reply #17 on: 09-10-2010, 21:10:16 »
This happens when target of push "link" is a flag that starts grey. This can be partially avoided by adding "wants_source_marker = False" to each link that has grey flag as target. Like that:
Code: [Select]
plugin(push, source = 'Trenton', target = 'Mcfarland_Mountain', attacker = 2, wants_source_marker = False),But if there are only grey flags as target, you can end up with having no markers at all. Well, this problem is yet to be solved :)

Also, you should avoid setting "reversed" links. Like this two, this is pointless, one is enough:
Code: [Select]
plugin(push, source = 'Seawall', target = 'Southwest_Harbor', attacker = 1),
plugin(push, source = 'Southwest_Harbor', target = 'Seawall', attacker = 2),

Offline [130.Pz]S.Lainer

  • FH-Betatester
  • ***
  • Posts: 1.934
    • View Profile
    • 130th
Re: [Tutorial] Push Mode
« Reply #18 on: 15-10-2010, 05:10:59 »
  Thanks Spit.  I tried the "wants_source_marker" bit and it did not seem to change anything.  Just for my own curiosity are there any other groovy variables in that push code?

As to the "reversed" links.....With those 3 flags the two teams start pushing from opposite directions so I thought I needed them.
http://www.bfewaw.com/campaigns/waw24/promo/campaign/waw24banner1.png
The purpose of this deployment was to "annoy and defy the United States ... on her with Bofors 40 mm guns from a range of 650

Offline fh_spitfire

  • Developer
  • ******
  • Posts: 421
  • FHer since 0.6 | aka spitfire05
    • View Profile
Re: [Tutorial] Push Mode
« Reply #19 on: 15-10-2010, 15:10:17 »
There is only one more
Code: [Select]
display_arrow = FalseWill make the arrow not show up for that link.

Offline Senshi

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: [Tutorial] Push Mode
« Reply #20 on: 19-12-2010, 11:12:35 »
Stumbled upon an issue:

Push mode. Two flags are avaible to attack at the start. Now I want the third flag to be "opened" once ONE of the two flags is conquered. How can I achieve this? Setting two "push" links makes both flags mandatory for the third flag, but I want only one to be required. Is this where the linkCPs come in? If yes, some explanation on those would be nice. Or is there a way to use "OR" in those push settings?

Offline [KamiKaze] Destroyer

  • Jr. Member
  • **
  • Posts: 352
    • View Profile
Re: [Tutorial] Push Mode
« Reply #21 on: 08-05-2012, 23:05:22 »
Hello :)

So you can choose about Arrow Visiblity, how about visibility of the X marks and O marks?

My map is simple, and doesint need marks, its straight forward which order the flags should be taken without marks in other words. However, the push mode i really need :] So, any ideas what is the code for this?

Offline Rabbit032

  • Jr. Member
  • **
  • Posts: 206
  • By all means necessary.
    • View Profile
Re: [Tutorial] Push Mode
« Reply #22 on: 06-11-2012, 16:11:58 »
Code: [Select]
from game.plugins import plugin, limitKit, push
 

kit_limits = [
  plugin(limitKit, team = 1, slot = 1, kit = 'GS_SMGAssault_Limited', limit = 0.25),
  plugin(limitKit, team = 2, slot = 1, kit = 'UW_SMGAssault_Limited', limit = 0.25),
  plugin(limitKit, team = 1, slot = 3, kit = 'GA_Limited_Support_MG34_K98', limit = 0.15),
  plugin(limitKit, team = 2, slot = 3, kit = 'UW_LMG_Limited', limit = 0.15),
  plugin(limitKit, team = 1, slot = 5, kit = 'GW_RifleAssault_G43_Limited', limit = 0.1),
  plugin(limitKit, team = 2, slot = 5, kit = 'UW_SMGAssault_Limited_GGun', limit = 0.1),
]

push_64 = [
    plugin(push, source = 'US', target = 'WN_72', attacker = 2),
    plugin(push, source = 'US', target = 'WN_67', attacker = 2),
   
    plugin(push, source = 'WN_72', target = 'Church', attacker = 2,),
    plugin(push, source = 'WN_67', target = 'Cross_Roads', attacker = 2,),
   
    plugin(push, source = 'Church', target = 'Vierville_Sur_Mer', attacker = 2,),
  ]

  gpm_cq = {
  64: kit_limits + push_64,
}
Any idea why my push code doesn't show up in conquest mode 64 player?
-032
Pipe Hitters Union

Offline Mudzin

  • Jr. Member
  • **
  • Posts: 692
    • View Profile
Re: [Tutorial] Push Mode
« Reply #23 on: 15-07-2014, 14:07:18 »
Is it possible to make such push code where 1 flag opens 2nd and capping that 2nd wouldn't make the first uncap?

Offline sn00x

  • Hero Member
  • ****
  • Posts: 2.404
    • View Profile
Re: [Tutorial] Push Mode
« Reply #24 on: 15-09-2014, 15:09:40 »
Very nice and such a simple tutorial! I had my Push exactly how i wanted in 5minutes! :D