• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Bandit Raids & Pass Taxes (Melee)

Status
Not open for further replies.
Level 3
Joined
Sep 29, 2012
Messages
18
Hello, all of this is for a melee map(altered, of course).

1. My first question is, what does one need to do in order to make it so that a group of creeps(bandits, etc) attack a random player's main base, let's say every ten minutes, or randomly? Without a warning of course. Like, they just spawn close to the base out of nowhere, and head for it in order to attack. And, if possible, this should only happen to actual players(not to empty player spots, as in if it's a 3v3 map, and only two people are playing 1v1, bandit raids will ONLY happen to them).

2. My second question is, how can you make it so that if a player reaches a certain spot on the map, a blockade/barricade "owned" by creeps that's blocking the path, they "ask" the player whether for example he can choose to give them 500 gold and pass safely, or refuse and have the creeps attack him?

If answering with triggers, please provide a more detailed answer if possible, I'm not very good with them.

Thank you in advance!
 
1) make a trigger that checks every ten minutes to see if that player is a user and is playing. U have to check for both. Then find the players main base and create a couple units at random point. The random point will be the point of the players Main Base offset by let's say 500 towards a random degrees. This way it's a random spot near the players main base.

2) if its in a set spot then make a region there. Then when player enters region bring up a dialog box w the two options. If player chooses gold take gold from player. Move the pathing blockers. If he chooses the other move pathing blockers change the units from neutral passive to neutral hostile through triggers. Don't create new units
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
Triggers :D

1- Start a timer that expires every 10 minutes that creates a random amount of bandits in a random spot on the map and order them to attack a random location (stored on an array).

2- You have to place the goblins, and the door destructable. If he pays, the door opens for X amount of time. If he doesn't, you spawn x amount of creeps there.

I can't make these right now, but you should start looking for triggering tutorials.
 
Level 3
Joined
Sep 29, 2012
Messages
18
Update on my first question:

I managed to make a trigger that creates a group of units at a certain spot which is commanded to rush towards a respective player's main base. A problem I have is that the group of units will first retreat back to its spawnpoint after having traveled a small distance, then will start charging towards the player's base again, and once it reaches it, it attacks it for a bit, then retreats back to its spawnpoint. I never programmed anything like that, how can I prevent it?

For the record, I'm utilizing:

1) Spartipilo's answer
2) parts from the lower half of http://world-editor-tutorials.thehelper.net/cat_usersubmit.php?view=118648
3) http://www.youtube.com/watch?v=W4rFp_8LgII ((mostly the second part on how to move the units))

If the links are troublesome/seen as advertisements I'll remove them.

Either way, anyone have an idea on how to fix my issue? Would be very grateful.
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
Check in the Gameplay constants the Creep data fields where you can stablish the campment guard distance and some other values that makes creeps return back to their original position. Increase the range or set it to 0, one of these should make creeps never go back.
 
Status
Not open for further replies.
Top