Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Anti Camping System
Anti Camping System
Aug 17 2009, 6:30 am
By: strupan  

Aug 17 2009, 6:30 am strupan Post #1



Anyone know how to make a anti camping system? I tried to make one but failed horribly.
Anyways I was thinking of one which if person stays at camping spot for too long, they will get send to jail for 2 min or something



None.

Aug 17 2009, 7:07 am Vrael Post #2



Well if that's what you want, what are you going to need? A timer, basically. Set aside a death counter for the timer.

If the player brings a unit to the camping location, start the timer "Player X brings at least 1 "Unit" to "Camping Location", and "Player X has suffered exactly 0 deaths of "Timer"

If they leave the location, clear the timer "Player X has suffered at least 1 deaths of "Timer" and "Player X brings exactly 0 "Unit" to "Camping Location".

If the player is still in the location and the timer reaches its maxiumum, send them to jail "Player X brings at least 1 "Unit" to "Camping Location" and "Player X has suffered exactly "Maxium Value Here" deaths of Timer"



None.

Aug 17 2009, 7:18 am strupan Post #3



it is REALLY confusing on how your saying it, would be nice to format it nicely, thanks



None.

Aug 17 2009, 8:01 am Decency Post #4



Deaths are used to keep track of "variables."

So each interval of time, you add 1 to the deaths of whatever unit you're using as your "timer unit," probably a psi emitter or something that won't actually die. When it hits the threshold limit, you send him to jail.



None.

Aug 17 2009, 8:30 am Vrael Post #5



Basically I gave you the conditions of the triggers you would need to do this. I don't mean to take my anger out on you, but I'm tired of people like you coming and asking extremely simple questions, while it appears that you've put no effort into solving it yourself. Rather than give you the explicit set of triggers which would teach you little, I hoped to only point you in the right direction by giving you the conditions, and allow you to solve it yourself. If you put 5 minutes of thought into this question I'm sure you'll figure it out.

I should have included this link as well: http://www.staredit.net/wiki/Death_Counters



None.

Aug 17 2009, 6:22 pm strupan Post #6



thats nut true verael! i try at least 30 min on each question before posting and for this one i even tried 2 hours only to find out that wait trigger doesnt work too well. . .

anyways i get it now after reading your reply and couple more time, thanks man your real great help



None.

Aug 17 2009, 6:53 pm XGenesis Post #7



These are the triggers you should need. It also depends on whether you use hyper triggers or not. Ok, here i go :dontgetit:

-------
This trigger will detect whether the unit is in the location, and makes sure the second trigger works
Condition : [player] brings [#] [units] to [location]
Condition : [player] commands 0 [checker]
Action : Set death count of [Timer] to 1 (the timer can be any unit that won't appear in the map)
Action : Create 1 [checker] at [location]
Action : Preserve Trigger

----------
This trigger will also detect the unit in the location, and start the timer for the consequence, and finishes what the first trigger started
Condition : death count of [timer] is at least 1
Conditon : [player] brings 1 [checker] to [location]
Action: Set death count of [timer 2] to [#]
Action : Remove all [checker] for [player]
Action: Preserve Trigger

----------

This starts the timer
Condition : death count of [timer 2] is at least 2 (so that 1 death count of timer 2 can be the consequence)
Condition : death count of [timer 2] is at MOST 1
Condition : death count of [timer] is exactly 1
Action : subtract one death count of [timer 2]
Action : preserve Trig

---------
Starts consequence and resets timer
Condition : death count of timer 2 is at exactly 1
Action : [consqeuence]
Action : Set death count of [timer 2] to 0
Action : Set death count of [timer] to 0
Action : preserve trigger

--------
Stops timer when there are no units in the area
Condition : [player] brings 0 [units] to [location]
Action : Set death count of [timer] to 0
Action : preserve trigger

-------------
:crazy: Well there you have it :P
Thats how I would do it, but it might be a bit more inefficient then what the other SEN people would suggest. Use mine as a last resort :P

EDIT : Left my SEN on for a while, and didn't see your post. Sorry about that.



None.

Aug 17 2009, 6:57 pm ProtoTank Post #8



A method to stop camping at ANY location could be to create burrowed units each second or so under the camper. After X amount of burrowed units are at the camper's location, remove the camper or penalize them some how. and of course, remove the units.



I'm only here because they patched SC1 and made it free.

Aug 17 2009, 7:04 pm strupan Post #9



Its not working for some reason. . .
What I triggered is reallly long so it would be easier if I just upload the map for you to see the trigger in.
Its in button of Player 7 and 8

Also, the death count doesn't seem to add up for some reason. . .

Attachments:
Zerg Hunt V1.1.scx
Hits: 0 Size: 66.95kb



None.

Aug 17 2009, 7:10 pm strupan Post #10



Quote from XGenesis
These are the triggers you should need. It also depends on whether you use hyper triggers or not. Ok, here i go :dontgetit:

-------
This trigger will detect whether the unit is in the location, and makes sure the second trigger works
Condition : [player] brings [#] [units] to [location]
Condition : [player] commands 0 [checker]
Action : Set death count of [Timer] to 1 (the timer can be any unit that won't appear in the map)
Action : Create 1 [checker] at [location]
Action : Preserve Trigger

----------
This trigger will also detect the unit in the location, and start the timer for the consequence, and finishes what the first trigger started
Condition : death count of [timer] is at least 1
Conditon : [player] brings 1 [checker] to [location]
Action: Set death count of [timer 2] to [#]
Action : Remove all [checker] for [player]
Action: Preserve Trigger

----------

This starts the timer
Condition : death count of [timer 2] is at least 2 (so that 1 death count of timer 2 can be the consequence)
Condition : death count of [timer 2] is at MOST 1
Condition : death count of [timer] is exactly 1
Action : subtract one death count of [timer 2]
Action : preserve Trig

---------
Starts consequence and resets timer
Condition : death count of timer 2 is at exactly 1
Action : [consqeuence]
Action : Set death count of [timer 2] to 0
Action : Set death count of [timer] to 0
Action : preserve trigger

--------
Stops timer when there are no units in the area
Condition : [player] brings 0 [units] to [location]
Action : Set death count of [timer] to 0
Action : preserve trigger

-------------
:crazy: Well there you have it :P
Thats how I would do it, but it might be a bit more inefficient then what the other SEN people would suggest. Use mine as a last resort :P

EDIT : Left my SEN on for a while, and didn't see your post. Sorry about that.

mm yours seems nice but I want to make it so the camper has to stay in that area for 60 sec or something then action,

what i did with vareal's idea is

if camper bring at least 1 to camp spot it would wait 1 second then keep adding death counts for timer until it reaches 60 death for 60 sec kind of thing but it didnt work for some reason.



None.

Aug 17 2009, 7:32 pm strupan Post #11



Quote from Vrael
Well if that's what you want, what are you going to need? A timer, basically. Set aside a death counter for the timer.

If the player brings a unit to the camping location, start the timer "Player X brings at least 1 "Unit" to "Camping Location", and "Player X has suffered exactly 0 deaths of "Timer"

If they leave the location, clear the timer "Player X has suffered at least 1 deaths of "Timer" and "Player X brings exactly 0 "Unit" to "Camping Location".

If the player is still in the location and the timer reaches its maxiumum, send them to jail "Player X brings at least 1 "Unit" to "Camping Location" and "Player X has suffered exactly "Maxium Value Here" deaths of Timer"
nvm it worked perfectly, just that i added the wait 1000 to create a death count is long and i didnt expect, anyways its working great thanks man!
problem solved!



None.

Aug 17 2009, 9:14 pm Neki Post #12



you don't need waits at all with this method. if you're using hyper triggers, the amount of death counts needed to reach 60 seconds would be 720 deathcounts, without hyper triggers, you would only need 60 deathcounts. though I almost always recommend you use hyper triggers in all of your maps, it increases the efficiency of the trigger checking.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[08:51 pm]
l)ark_ssj9kevin -- Are you excited for Homeworld 3?
[08:44 pm]
l)ark_ssj9kevin -- Hi Brusilov
[04:35 pm]
O)FaRTy1billion[MM] -- Brusilov
Brusilov shouted: Hey, what happened to EUDDB? Is there a mirror for it somewhere? Need to do a little research.
my server that was hosting it died
[2024-5-10. : 8:46 pm]
NudeRaider -- Brusilov
Brusilov shouted: Hey, what happened to EUDDB? Is there a mirror for it somewhere? Need to do a little research.
https://armoha.github.io/eud-book/
[2024-5-10. : 8:36 am]
Brusilov -- Hey, what happened to EUDDB? Is there a mirror for it somewhere? Need to do a little research.
[2024-5-09. : 11:31 pm]
Vrael -- :wob:
[2024-5-09. : 8:42 pm]
Ultraviolet -- :wob:
[2024-5-08. : 10:09 pm]
Ultraviolet -- let's fucking go on a madmen rage bruh
[2024-5-08. : 10:01 pm]
Vrael -- Alright fucks its time for cake and violence
[2024-5-07. : 7:47 pm]
Ultraviolet -- Yeah, I suppose there's something to that
Please log in to shout.


Members Online: MetalGear