Last 2 things to finish my work...

wc345

Member
Reaction score
1
Hi
So it is left only 2 things to finish my map,i hope anyone will help me out and with that like all other stuffs around my map :)
So :
1.How can i do when for example 30 waves over the games over (If PlayerRedLives is more than PlayerBlueLives,Player Red Wins) ?
And
2.How can i do a command in the game like (-2pl) for 2 players and (-4pl) for 4 players because i put the 4 starts from where comes units and if playing only 2 players to go only from 2 starts ? Is it possible ? And if is it,how ?

It's about a TD map and i'm sorry if i'm a very cheeky...
 

Inflicted

Currently inactive
Reaction score
63
It's about a TD map and i'm sorry if i'm a very cheeky...
Not at all, your welcome to ask here.

1.How can i do when for example 30 waves over the games over (If PlayerRedLives is more than PlayerBlueLives,Player Red Wins) ?
Have a count of your levels, and when it should go to "level 31" do a trigger checking which player has more lives left. Then display Defeat message saying "Winner" or "Loser". Well end actions are up to you, lol.

2.How can i do a command in the game like (-2pl) for 2 players and (-4pl) for 4 players because i put the 4 starts from where comes units and if playing only 2 players to go only from 2 starts ? Is it possible ? And if is it,how ?
There is an event that detects text being entered:
Player - Player 1 (Red) types a chat message containing -2pl as An exact match
for example.
Then have a boolean variable set that is checked when the levels spawn, if the boolean value is set to True/False (however you wanted it) then decide where the waves are meant to spawn and not meant to spawn.

Erm, I need to sleep now. But if you can't figure it out and nobody has solved this by the time I'm back; I will do another demo map showing this for you.
 

wc345

Member
Reaction score
1
I still can't figure it out :( I don't know how to make that event which detects entered text and also can't do a trigger which cheking who got more lives :( I really sorry about that...
 

Smitty

Member
Reaction score
20
Entered text is under the 'player' event section, I believe it's at the top of the list. To detect who has more lives you need a trigger using a sorting algorithm, there have been a fair few in different threads, try a search for it. You could instead just detect how many players are playing, rather than relying on your players to type in a command, but that's up to you :)
 

wc345

Member
Reaction score
1
Well in the Event section and then Player,there's Chat Message with text,that's what i find there and i've search but i can't find anything...
 

Inflicted

Currently inactive
Reaction score
63
Here you go:
Trigger:
  • Player sets amount of players
    • Events
      • Player - Player 1 (Red) types a chat message containing -2pl as An exact match
      • Player - Player 1 (Red) types a chat message containing -4pl as An exact match
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Entered chat string) Equal to -2pl
        • Then - Actions
          • Set DualPlayerMode = True
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Entered chat string) Equal to -4pl
        • Then - Actions
          • Set DualPlayerMode = False
        • Else - Actions

Trigger:
  • Your spawning trigger
    • Events
      • Time - Every 2.50 seconds of game time
    • Conditions
    • Actions
      • -------- Add some conditions to your spawning triggers --------
      • -------- spawn 1 --------
      • Unit - Create 1 Footman for Player 12 (Brown) at (Center of Spawn 1 <gen>) facing Default building facing degrees
      • -------- spawn 2 --------
      • Unit - Create 1 Footman for Player 12 (Brown) at (Center of Spawn 2 <gen>) facing Default building facing degrees
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • DualPlayerMode Equal to False
        • Then - Actions
          • -------- spawn 3 --------
          • Unit - Create 1 Footman for Player 12 (Brown) at (Center of Spawn 3 <gen>) facing Default building facing degrees
          • -------- spawn 4 --------
          • Unit - Create 1 Footman for Player 12 (Brown) at (Center of Spawn 4 <gen>) facing Default building facing degrees
        • Else - Actions

DualPlayerMode is a Boolean that is set to True if it is in 2Player Mode, but defaultly set to False for 4 player mode.

Here is the promised demo map:
 

Attachments

  • Simple Spawn Setup.w3x
    9.4 KB · Views: 160

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
613
You forgot to attach the map, Inflicted. (xD)

Back on-topic, you need an integer variable that keeps track of waves. When that variable's value goes over 30, then you run a separate trigger that deals with the victory/defeat actions.
 

Inflicted

Currently inactive
Reaction score
63
lolz yeah my bad.
He should already have the Wave Level Count somewhere in his level system. But yeah it should be obvious what he needs to do, if there is anything that is unclear, feel no hesitation in asking.
 

wc345

Member
Reaction score
1
But did i need to delete my other spawn triggers ? or just add and this spawn triggers ?
 

Inflicted

Currently inactive
Reaction score
63
Add the conditions that where used from my example to your original spawn trigger.
No need to delete anything, rather adjust it.
 

wc345

Member
Reaction score
1
But the problem is that i've made a spawns another units from starting regions and when i do this they will spawn and my and units from this trigger ?
 

Inflicted

Currently inactive
Reaction score
63
Just put my conditions for "Your spawning trigger" into your original trigger.
Eg, your spawn looks like this:

Time is ##
Spawn at Point1
Spawn at Point2
Spawn at Point3
Spawn at Point4

Change it to:

Time is ##
Spawn at Point1
Spawn at Point2
if DualPlayerMode (or whatever the variable was) = False
THEN [
Spawn at Point3
Spawn at Point4
]

Because you only want to spawn at the 2 points in 2 player mode, while in 4 player mode it spawns at all 4 points.
 

wc345

Member
Reaction score
1
Yes,thanks a lot man,now it works just fine :) Thanks for good definition,but now how can i do a end of game (like when all 30 waves over,it says "Defeat" to player which have less lives from other(s) ) ?
 

Inflicted

Currently inactive
Reaction score
63
Do you have a Variable that keeps the level? Like a Wave Count kindof thing?
Add a Condition to your spawn trigger that says:
If/Else Statement
IF Level = 31
THEN
If (Player 1 Lives Greater than Player 2 Lives)
Show Victory for Player 1
Show Defeat for Player 2
Else
Show Defeat for Player 1
Show Victory for Player 2

But you might want to also add in something to check if they are equal for a draw. That's up to you.

Edit: Explanation: Oh, the reason I said 31, is because you said there was 30 levels. As the count reaches more than that (in this case 31) it plays the end game actions. There are many ways to do this, but this is imo probably the simplest.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • WildTurkey WildTurkey:
    is there a stephen green in the house?
    +1
  • The Helper The Helper:
    What is up WildTurkey?
  • The Helper The Helper:
    Looks like Google fixed whatever mistake that made the recipes on the site go crazy and we are no longer trending towards a recipe site lol - I don't care though because it motivated me to spend alot of time on the site improving it and at least now the content people are looking at is not stupid and embarrassing like it was when I first got back into this like 5 years ago.
  • The Helper The Helper:
    Plus - I have a pretty bad ass recipe collection now! That section of the site is 10 thousand times better than it was before
  • The Helper The Helper:
    We now have a web designer at my job. A legit talented professional! I am going to get him to redesign the site theme. It is time.
  • Varine Varine:
    I got one more day of community service and then I'm free from this nonsense! I polished a cop car today for a funeral or something I guess
  • Varine Varine:
    They also were digging threw old shit at the sheriff's office and I tried to get them to give me the old electronic stuff, but they said no. They can't give it to people because they might use it to impersonate a cop or break into their network or some shit? idk but it was a shame to see them take a whole bunch of radios and shit to get shredded and landfilled
  • The Helper The Helper:
    whatever at least you are free
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top