Author Topic: Sunset script?  (Read 480 times)

I was working on the Pikmin mod and needed to know how i would get a sunset script to work. It does not need to change the day's color but it needs to kill anyone who is not touching a brick named Onion by the end of the time period. I would also like it to display a message 2 minutes before night hits. Could someone help me out making this? I would want it to be a 10 minute day, even though I could easily change that.

onPlayerTouch only registers for the first player to touch a brick. You will have to use a trigger or some similar method to detect people in an area.

onPlayerTouch only registers for the first player to touch a brick. You will have to use a trigger or some similar method to detect people in an area.
How about a raycast or something?

Zone events?

Activation:
(method of calling) self setZone (up) (height in bricks) (0 0 0)
onZoneEnter player (variable stuff here true)
onZoneLeave player (variable false)

Deactivation:
(method of calling) self setZone (none)

By method of calling, I'm talking about if you use onActivate or a remote brick fires setZone on that brick.

If you make a giant 64x plate, it will make the zone the size of the plat and the height in bricks of your choosing.

I was thinking of events like togglesafe. If you do whatever to become safe, you won't die at the end of night.

Make an event Player->setDaySafe [bool] and Player->toggleDaySafe, then a minigame event/function only allowed to be triggered by the minigame owner to loop through the minigame's players and kill off anyone not currently "safe".

Then you can use it in servers as a brick event or the game mode with automatic %minigame.dayEnd(%minigame.owner) or whatever.