Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: More Trigger Glitches
More Trigger Glitches
Nov 30 2009, 5:04 am
By: ImagoDeo  

Nov 30 2009, 5:04 am ImagoDeo Post #1



All right. I've got more problems.

I thought I had it all figured out. Me and my friends thought I could make a better version of a Lost Kingdoms game that kinda sucked, but was fun anyway. So I set out to do it. Turns out it wasn't quite as easy as I thought it would be; working without computer players threw hurdles in my path, but I figured out ways around them. Then I started testing, and found out that I hadn't worked everything out.

Essentially, I needed a death count timer that would subtract one every turn no matter what combination of players was playing. So I designated which player ran the timer with another death count, using 'current player' conditions and such. Once it hit 0, it ran spawns for every player, and when the spawns were completed, it reset the spawners (supply depots, as usual) and set the count back to 708 (60sec @ 11.8 cycles/sec).

The first speed bump was easy to get around; I had originally intended to use barracks for spawners, and later switched to supply depots, so the reset to 708 was based on barracks instead of supply depots. That was a quick fix. Then things went completely wrong. The spawn never runs.

I've attached the map, in the alpha stages. Please don't criticize, just try to find the problem. I've removed comments on the relevant triggers. You can view the spawn triggers and spawn reset triggers if you want, but I don't think that's where the problem lies.

Thanks in advance for any help you guys can give.

EDIT: Removed map. There are still some bugs; please don't lock until I ask.

Post has been edited 1 time(s), last time on Nov 30 2009, 10:20 pm by ImagoDeo.



None.

Nov 30 2009, 6:20 am Neki Post #2



I quite don't understand your trigger work. You have two triggers that basically accomplish the same thing, but you're clearing and setting the switch every time, why? What is the point of the switch? It's not going to be doing anything with you constantly switching states. I also don't like you combining the use of Current Players with the Players in your triggers, it doesn't seem like it will work out well. Also, not sure about this, but can't you use death counts for a neutral player like p12? Or you could use a countdown timer?

Try removing the switch conditions and actions, and then just completely remove the Kakaru conditions and actions and the third box of triggers, unless you're using the Kakaru for something else.


Post has been edited 2 time(s), last time on Nov 30 2009, 6:34 am by Ultimo.



None.

Nov 30 2009, 12:52 pm NudeRaider Post #3

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

OK, your problem is to determine a single active player responsible for the dc count.

Use this simple trigger to determine only 1 player:

All Players
Condition:

All Players has suffered at most 0 deaths of 'determine'
Actions:
Set deaths of 'determine' to 1 for Current Player

As soon as one player has set the 'determine' dc for himself no other player can run this trigger because the condition becomes false. When a player leaves the condition becomes true again because sc only includes active players when comparing values of groups. So the next player in line will become active.

Then have the "Reset DC" trigger check for the 'determine' dc. Note that inactive players can't run triggers so we don't have to worry about that. It would look like this:

Reset DC
All Players
Conditions:

Current Player has suffered at least 1 deaths of 'determine'
Current Player has suffered at most 0 deaths of 'timer'
Actions:
Set deaths of 'timer' to 708 for All Players *1)
Set deaths of 'spawn' to 1 for All Players
Preserve Trigger

Spawn
All Players
Conditions:

Current Player has suffered at least 1 deaths of 'spawn'
[whatever you need to detect what to spawn]
Actions:
[do spawning, possibly in multiple triggers]
Set deaths of 'spawn' to 0 for Current Player (Add this only to the last of the spawning triggers if there's more than 1)
Preserve Trigger

*1) Using Current Player here would instantly trigger a spawn when the "counting player" leaves and the next player takes over.
Of course for this to work your DC Counter trigger hast to be owned by all players and always subtract 1 for Current Player.
This way all players always have the same 'timer' count, but still only 1 player would "manage" the spawns and resets.




Nov 30 2009, 4:31 pm ImagoDeo Post #4



Quote from name:Ultimo
I quite don't understand your trigger work. You have two triggers that basically accomplish the same thing, but you're clearing and setting the switch every time, why? What is the point of the switch? It's not going to be doing anything with you constantly switching states. I also don't like you combining the use of Current Players with the Players in your triggers, it doesn't seem like it will work out well. Also, not sure about this, but can't you use death counts for a neutral player like p12? Or you could use a countdown timer?

Try removing the switch conditions and actions, and then just completely remove the Kakaru conditions and actions and the third box of triggers, unless you're using the Kakaru for something else.

Thinking about it, the switch is kind of useless. The Kakaru, though, is used to let the game know which player is running the timer at any given time. The system I have could be simplified somewhat by removing the switch and the third trigger box. Players 9-12 cannot have their death counts set by triggers.

Quote from NudeRaider
OK, your problem is to determine a single active player responsible for the dc count.

Use this simple trigger to determine only 1 player:

All Players
Condition:

All Players has suffered at most 0 deaths of 'determine'
Actions:
Set deaths of 'determine' to 1 for Current Player

As soon as one player has set the 'determine' dc for himself no other player can run this trigger because the condition becomes false. When a player leaves the condition becomes true again because sc only includes active players when comparing values of groups. So the next player in line will become active.

Then have the "Reset DC" trigger check for the 'determine' dc. Note that inactive players can't run triggers so we don't have to worry about that. It would look like this:

Reset DC
All Players
Conditions:

Current Player has suffered at least 1 deaths of 'determine'
Current Player has suffered at most 0 deaths of 'timer'
Actions:
Set deaths of 'timer' to 708 for All Players *1)
Set deaths of 'spawn' to 1 for All Players
Preserve Trigger

Spawn
All Players
Conditions:

Current Player has suffered at least 1 deaths of 'spawn'
[whatever you need to detect what to spawn]
Actions:
[do spawning, possibly in multiple triggers]
Set deaths of 'spawn' to 0 for Current Player (Add this only to the last of the spawning triggers if there's more than 1)
Preserve Trigger

*1) Using Current Player here would instantly trigger a spawn when the "counting player" leaves and the next player takes over.
Of course for this to work your DC Counter trigger hast to be owned by all players and always subtract 1 for Current Player.
This way all players always have the same 'timer' count, but still only 1 player would "manage" the spawns and resets.

Raider - that's very similar to the system that I have already, except that my system is a little overcomplicated. Switching to your system would be difficult, because I would have to edit thirty two different triggers. Also, the spawns are seperate - some of them won't be active until players capture those specific locations. In that case, having the last one reset the spawn count wouldn't work.

I appreciate the advice from both of you. I'll run a few tests, modify some things, and if the problem is resolved, I'll ask for a lock on this thread. Thanks.



None.

Nov 30 2009, 4:48 pm NudeRaider Post #5

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 ImagoDeo
Raider - that's very similar to the system that I have already, except that my system is a little overcomplicated. Switching to your system would be difficult, because I would have to edit thirty two different triggers. Also, the spawns are seperate - some of them won't be active until players capture those specific locations. In that case, having the last one reset the spawn count wouldn't work.
Still this is the way to go. And editing 32 triggers is no work at all considering you have a very efficient and bug-free system afterwards.

Then make a trigger at the end that doesn't spawn, but just resets the dc. Just make sure all spawn triggers are above it in the trigger list.
Besides I just assumed you'd do the spawning that way because it's the most simple and efficient but if you use another method that prevents you from using the suggested determine trigger (which the emphasis is on) then elaborate on your spawning method and I'll try to find a way to alter the determine trigger to fit in.
However when you understand the determine trigger it should be no problem to do the modifications yourself.

Also:
Quote from ImagoDeo
Players 9-12 cannot have their death counts set by triggers.
Not entirely correct. You can set and check for their dcs, just you need an active player running the trigger, which is why this doesn't help here.

Disregard. I confused this with inactive players.

Post has been edited 1 time(s), last time on Nov 30 2009, 5:25 pm by NudeRaider. Reason: corrected mistake




Nov 30 2009, 5:06 pm ImagoDeo Post #6



Quote from NudeRaider
Quote from ImagoDeo
Raider - that's very similar to the system that I have already, except that my system is a little overcomplicated. Switching to your system would be difficult, because I would have to edit thirty two different triggers. Also, the spawns are seperate - some of them won't be active until players capture those specific locations. In that case, having the last one reset the spawn count wouldn't work.
Still this is the way to go. And editing 32 triggers is no work at all considering you have a very efficient and bug-free system afterwards.

Then make a trigger at the end that doesn't spawn, but just resets the dc. Just make sure all spawn triggers are above it in the trigger list.
Besides I just assumed you'd do the spawning that way because it's the most simple and efficient but if you use another method that prevents you from using the suggested determine trigger (which the emphasis is on) then elaborate on your spawning method and I'll try to find a way to alter the determine trigger to fit in.
However when you understand the determine trigger it should be no problem to do the modifications yourself.

Also:
Quote from ImagoDeo
Players 9-12 cannot have their death counts set by triggers.
Not entirely correct. You can set and check for their dcs, just you need an active player running the trigger, which is why this doesn't help here.

Ahem:

Quote from Vrael
Players 9 though 12 cannot own triggers, and hence cannot run AI scripts, disabling the ability to set alliance or vision statuses. If provoked player 9-11 units will follow the assailant but not attack it- this is because they do not have vision (and cannot be given it by any means), not even for their own units which makes them unable to attack. You can read Player 9-12 death counters but you cannot set them by actions (adding to their death counters must be done manually by killing their units) effectively eliminating use of their deaths as a dynamic variable.

I understood the 'determine' trigger set before you stated it here. In fact, it was the solution I came up with all on my own while I was on Thanksgiving vacation.

I am doing the spawn triggers in the most efficient fashion for my map. I'm using neutral as a middleman and giving the depot to neutral whenever a spawn trigger fires. Once the players own no more depots, it resets the timer and sets a death count that gives all the depots back to the players that are supposed to have them. The biggest difficulty was the fact that I have no computer players to work with.

The other problem at the moment is that I can't test it single-player. If I could test it, I'm about 75% sure that my triggers would work perfectly now; I've simplified them and changed some things.



None.

Nov 30 2009, 5:36 pm NudeRaider Post #7

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 ImagoDeo
Ahem:
Quote from Vrael
...
Thanks. You were right, I edited my post accordingly.

Quote from ImagoDeo
I am doing the spawn triggers in the most efficient fashion for my map. I'm using neutral as a middleman and giving the depot to neutral whenever a spawn trigger fires. Once the players own no more depots, it resets the timer and sets a death count that gives all the depots back to the players that are supposed to have them. The biggest difficulty was the fact that I have no computer players to work with.
This is the same idea that is behind my suggestion using a dc. Except it's physically giving away/back a depot, instead of clearing/setting a dc. So this should work perfectly.

Quote from ImagoDeo
The other problem at the moment is that I can't test it single-player. If I could test it, I'm about 75% sure that my triggers would work perfectly now; I've simplified them and changed some things.
If you have no friends you can ask SENners via shoutbox to help you test your map. Or go op sen @east. I'm sure you'll find someone.
I can also help you test right now.




Nov 30 2009, 6:41 pm ImagoDeo Post #8



Quote from NudeRaider
This is the same idea that is behind my suggestion using a dc. Except it's physically giving away/back a depot, instead of clearing/setting a dc. So this should work perfectly.

If you have no friends you can ask SENners via shoutbox to help you test your map. Or go op sen @east. I'm sure you'll find someone.
I can also help you test right now.

Yeah, I know that I can ask for testers here and in op sen - but at the moment I'm not even supposed to be on the SEN forums. Mom has this thing about no non-schoolwork computer time until all my homework is done... :><:

Once I've found time for testing and can confirm that the triggers are working, I'll ask for this thread to be locked.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[03:55 pm]
Zoan -- :wob:
[10:34 am]
NudeRaider -- SEN doesn't rely on spammers initiate its sleep cycle. It hat fully automated rest and clean-up phases. Please understand that this is necessary for the smooth operation of the site. Thank you.
[03:45 am]
Sylph-Of-Space -- Does the shoutbox get disabled when there's spammers?
[2024-5-17. : 6:47 am]
NudeRaider -- lil-Inferno
lil-Inferno shouted: nah
strong
[2024-5-17. : 5:41 am]
Ultraviolet -- 🤔 so inf is in you?
[2024-5-17. : 4:57 am]
O)FaRTy1billion[MM] -- my name is mud
[2024-5-17. : 4:35 am]
Ultraviolet -- mud, meet my friend, the stick
[2024-5-16. : 10:07 pm]
lil-Inferno -- nah
[2024-5-16. : 8:36 pm]
Ultraviolet -- Inf, we've got a job for you. ASUS has been very naughty and we need our lil guy to go do their mom's to teach them if they fuck around, they gon' find out
[2024-5-16. : 5:25 pm]
NudeRaider -- there he is, right on time! Go UV! :D
Please log in to shout.


Members Online: Degon760, Roy, 1milae19100eh9