Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: CPU Players Playing! >_<
CPU Players Playing! >_<
Apr 16 2008, 10:05 am
By: CeR  

Apr 16 2008, 10:05 am CeR Post #1



Hi. In my map, I make some units to players1,2,3,4,5,etc..

When these players aren't humans, (not playing), the units are done for a CPU player.

The trigger i'm talking about is exec from player 8 (CPU), and is this trigger who make the units for al players..

I'm spanish.. if someone can understand me better in spanish...


Nothing more, waiting for u response >_<



None.

Apr 16 2008, 10:17 am Ahli Post #2

I do stuff and thingies... Try widening and reducing the number of small nooks and crannies to correct the problem.

Change the triggers into create actions using "current player" and change the trigger owner to the players' Force.

It's easier to avoid it instead of repairing the failure.




Apr 16 2008, 11:10 am CeR Post #3



Another kind of solution?

This is imposible. The trigger cant be exec by the Force cause cant use Current player (the same trigger make unit for all players) Its a "random" trigger...

And something like this:?

· Player (ausent player) (current player) comand 0 units
--
· Delete all player units everywhere
· Preserve


This trigger is exec to all players force.

¿What do you thing?



None.

Apr 16 2008, 3:55 pm NudeRaider Post #4

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

Ahli is right. We could tell you how to remove the mess you created but that's bad style. We will teach you clean mapping instead.

If it's a trigger that has always to run AND create random units for human players use death counters. They will only be set for present players. Like this:

Trigger that has to run in any case:
<Comp Player>
Condition:

<whatever>
Actions:
<whatever>
Set deaths of <Human Force> of 'dc1' to 1

Trigger doing randomization
<Human Force>
Condition:

Current Player has suffered exactly 1 death of 'dc1'
Actions:
Set deaths of 'dc1' to 2 for Current Player
<do randomization> (e.g. randomize switch(es))

Trigger creating the unitz
<Human Force>
Condition:

Current Player has suffered exactly 2 deaths of 'dc1'
<random condition> (e.g. switch 1 is set)
Actions:
Set deaths of 'dc1' to 0 for Current Player
Create <unit> for Current Player

The trick with this system is that only present players are running the creation triggers, but the 1st trigger owned by the comp is still there.

As a side note, this will work even though I use a global switch here, because the triggers are checked by player by player. For example first ALL of P1's triggers are executed (randomization and creation) then P2's triggers are checked and the global switch 1 will again be randomized and the units created upon the result.

If this is not exactly what you need explain your specific case a little better and we can give more specific solutions.




Apr 16 2008, 8:25 pm CeR Post #5



The randomization is general of the map, not only for the creation of the unit. I can't modify the randomization. My map is about "minigames", and when I make the unit for player1,2,3,4,etc.. CPU gets units too.

A solution I found this morning:
Kill all units in the random place (the randomization is for the place of creation) and re-do the units, in the asigned location.

This system works, however in another minigame, the randomization is so strong and it will be harder for me solving this problem.



None.

Apr 16 2008, 9:52 pm Phobos Post #6

Are you sure about that?

I speak spanish. You can private message me so I can tell others if you need anything. But, you actually seem to be doing pretty well.



this is signature

Apr 17 2008, 12:04 am Falkoner Post #7



You are attempting to create units for players that are not there, either put the triggers under the only players the units are being created for, or in other words use Current Player.
When you create units for players not in the game, it creates the units for "Ghost Players." These units are automatically unallied to all other players, or whatever their last alliance was before the player left the game.



None.

Apr 17 2008, 3:33 am NudeRaider Post #8

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

Quote from CeR
The randomization is general of the map, not only for the creation of the unit. I can't modify the randomization. My map is about "minigames", and when I make the unit for player1,2,3,4,etc.. CPU gets units too.

A solution I found this morning:
Kill all units in the random place (the randomization is for the place of creation) and re-do the units, in the asigned location.

This system works, however in another minigame, the randomization is so strong and it will be harder for me solving this problem.
As you noticed yourself this is no real solution.
The solution is still my above trigger system. If you don't need to create units randomly, just remove the randomization trigger (and, obviously, fix the dc values). Give different dc values for different minigames and make as many creation triggers as there are minigames.




Apr 18 2008, 10:08 am CeR Post #9



Solution to all:

Tr1gger1: CPU is playing?
PLAYERS
[*]Player 1
CONDITIONS
[*]always?
ACTIONS
[*]Set "CPU 1 remove"

Trigger 2: CPU death
PLAYERS
[*]Player 1
CONDITIONS
[*]"CPU 1 remove" is clear
ACTIONS
[*]Remove all units for this player everywhere
[*]Preserve


If the trigger 1 isn't executed because the player isn't playing, all "ghost unit" will be removed from game.
If the trigger is executed (player is human, is gaming), the units will be alive.

2 triggers, 2 triggers for player. I think that if this works, is much better that changing all the randomization sys..

This is like some other maps, where when a player leaves the game, all their units die. I think is this system. When the player leaves the game, one trigger stop executing and this make units to dissapear.

Anybody see something to change?


PD: Thanks, Phobos[MM]. :P

Post has been edited 3 time(s), last time on Apr 18 2008, 10:20 am by CeR.



None.

Apr 18 2008, 10:35 am NudeRaider Post #10

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

You're getting it wrong. When human players are not present and you create units for them anyway, there's still no cpu playing.
There are ghost units created that are by default enemy to everyone. Otherwise they act like neutral and they can't own triggers (unlike actual computer players).

Your solution doesn't work because you set a global switch. It WILL remove the units when the player is missing, BUT it will also remove them if the player is there!
Why don't you like the real solution? 3 experienced mappers already told you to use current player. Do I need to explain something more?

If you want to remove units from leavers make a trigger owned by a computer player that always removes all [any unit] of P12.




Apr 18 2008, 10:50 am CeR Post #11



If a player is not playing, his triggers works?

Ok, will change my randomization system..

Can you explain me the remove the unis of the leavers system?



None.

Apr 18 2008, 3:25 pm Falkoner Post #12



If a player leaves, or does not start in the game, the triggers under his slot do not run anymore, but if you attempt to create units for that player from another player's trigger slot, you get ghost units.

To remove units for players who have left the game, you just have to remove units for player 12, when a player leaves, all of their units are given to player 12. But if you create ghost player units, like you were, then they are still owned by the player.



None.

Apr 18 2008, 3:30 pm CeR Post #13



Ok, thank you.

In SCMdraft2, player 12 is "neutral"?



None.

Apr 18 2008, 3:31 pm Falkoner Post #14



Yes, just Neutral.



None.

Apr 18 2008, 4:04 pm NudeRaider Post #15

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

don't mix it up with "neutral players", which is a force afaik.




Apr 18 2008, 4:12 pm CeR Post #16



I have it clear..

Otherwise:

Is normal my Starcraft crash when put a Psi storm sprite?



None.

Apr 18 2008, 4:21 pm NudeRaider Post #17

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

I'm not sure. But you can test this real quick.
Anyways, if it doesn't crash it will only play the animation once and then disappear, so it's only useful to show an effect at game start.




Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[03:02 am]
Ultraviolet -- I'm gonna send inf to have sex with their moms
[03:02 am]
Ultraviolet -- fuck those motherfuckers
[11:02 pm]
NudeRaider -- PSA: ASUS apparently decided their RMA department needs to "become profitable" and for a while now outright tries to scam customers. They were called out on it a year ago, promised to change, but didn't. https://www.youtube.com/watch?v=7pMrssIrKcY so my recommendation: Stop buying ASUS, and if you already have and need something RMA'd, make sure to not let them bully you into paying.
[03:08 pm]
Oh_Man -- example of wat u mean?
[2024-5-15. : 5:59 am]
NudeRaider -- *is
[2024-5-15. : 5:17 am]
NudeRaider -- despite all its flaws the sound design its fantastic
[2024-5-14. : 10:29 pm]
Oh_Man -- homeworld 3 = massive disappointment
[2024-5-14. : 10:05 am]
Moose -- ya
[2024-5-14. : 5:23 am]
zsnakezz -- yes
[2024-5-12. : 8:51 pm]
l)ark_ssj9kevin -- Are you excited for Homeworld 3?
Please log in to shout.


Members Online: Dechdic03, RexyRex, 3gabriellac5191rb7, 2harperc2622rp4