SUNBURN STATUS CONDITION

Posts

Pages: first 12 next last
Hey all, I'm trying to implement a feature where if you spend too much time on a beachy area, you'll get sunburnt. would it be a matter of putting a combination of a common event and an event in the said area or can it be done just through a common event? All I know is that a switch should activate upon entering the area, a timer counting down then the characters status condition change (Ivee made an item "Beach umbrella" that'll prevent the sunburn status effect only in a beach if its in inventory) and the switch turning off when exiting.

Also any advice on the coding? I'd rather not have the coding done out for me, I would learn it better by doing ithe majority of the coding on my own. I know it'll have fork conditions in the coding but thats the part thats fuckin with me. Any help appreciated. Cheers!
It's rather simple and will require a very minimal amount of coding. If you have a common event (parallel process) that is activated by a switch, you can just have it wait however long (let's say one second) and then add +1 to a variable. Then, create a conditional branch right after that, checking to see if that variable has reached the threshold you want it to be (60 seconds, to continue with my previous example). After that, create another condition branch inside of that one, which checks to see if the Beach Umbrella is in your inventory (make sure the "Execute Custom Handler if not met" box is checked). Leave the main box blank, but in the "Else Handler" have it inflict the status effect Sunburned and include anything else you want there (maybe a message saying your party is sunburned, or whatever).

I hope this helps. If you need any elaboration or further explaining, I'd be glad to. :]
post=145567
It's rather simple and will require a very minimal amount of coding. If you have a common event (parallel process) that is activated by a switch, you can just have it wait however long (let's say one second) and then add +1 to a variable. Then, create a conditional branch right after that, checking to see if that variable has reached the threshold you want it to be (60 seconds, to continue with my previous example). After that, create another condition branch inside of that one, which checks to see if the Beach Umbrella is in your inventory (make sure the "Execute Custom Handler if not met" box is checked). Leave the main box blank, but in the "Else Handler" have it inflict the status effect Sunburned and include anything else you want there (maybe a message saying your party is sunburned, or whatever).

I hope this helps. If you need any elaboration or further explaining, I'd be glad to. :]


Ahhh I see, was missing the variable bit! Also, could I do the timer just by using he wait command? or strictly by the timer command? would the coding start out

common event, activate on switch "enter beach"
timer set
timer xxmins
variable "sunburn" +1
fork condition variable "sunburn" same 1
fork conditoin beach umbrella item, has it

else case (for second fork) - all party members sunbrn condtn.

somethinglike that??
Ocean
Resident foodmonster
11991
No real need to use a timer, you can use a variable and a wait command.
For example:

Wait 1.0 seconds
Variable + 1

If that is in a parallel process, then every second the variable will add to one. Then you just need a fork condition to check to see if it reached the time you want. So 60 seconds would be variable amount 60 in this case.

But yeah, switches are good for if you're not in the area. Be sure to reset it back to 0 when you go from a new area back on to the beach though!
Thanks, Ocean. I forgot to explain that the timer would no longer be necessary if he used my method, haha. ^^
post=145570
No real need to use a timer, you can use a variable and a wait command.
For example:

Wait 1.0 seconds
Variable + 1

If that is in a parallel process, then every second the variable will add to one. Then you just need a fork condition to check to see if it reached the time you want. So 60 seconds would be variable amount 60 in this case.

Alright! think I got it but say if I wanted to have the timer set to say 15mins (it'll be a fully explorable area) could I still use the wait command or would it be easier to use set timer cond.? I guess if it its done the "Wait" way it would be easier, i'd just have to put multiple wait commands that add to 15 mins right?
If you want it to be fifteen minutes before the sunburn is put into place, simply increase the threshold in the first condition fork. Instead of checking to see if 60 seconds have passed, it would check for 900 before deciding whether or not the sunburn should be applied.
post=145573
If you want it to be fifteen minutes before the sunburn is put into place, simply increase the threshold in the first condition fork. Instead of checking to see if 60 seconds have passed, it would check for 900 before deciding whether or not the sunburn should be applied.


Oh i got it, so no need to alter the wait command at all, just a constant 1 second, and edit the variable fork conditon accordingly. Thanks a bunch guys!!
You could do this all in one common event. Check the terrain ID of the square under the hero, seeing if it's sand, (or else just check if map ID is a seashore). Then you check every say 10 seconds if that condition isn't met (that way if you leave the beach and come back the time doesn't stack). Once the time has elapsed, add the condition.

By the way, it's vital that even if you use the above methods that you check in between the time iterations that the hero hasn't left the area. It would be strange to enter a beach for a few seconds then get sunburn 15 minutes later in the middle of the city, stuff like that.
post=145575
You could do this all in one common event. Check the terrain ID of the square under the hero, seeing if it's sand, (or else just check if map ID is a seashore). Then you check every say 10 seconds if that condition isn't met (that way if you leave the beach and come back the time doesn't stack). Once the time has elapsed, add the condition.

By the way, it's vital that even if you use the above methods that you check in between the time iterations that the hero hasn't left the area. It would be strange to enter a beach for a few seconds then get sunburn 15 minutes later in the middle of the city, stuff like that.


To answer your 2nd paragraph, doesnt reseting the variable to 0 upon leaving the area do the trick right?? Im super new to rpg maker programmes so your method might be a bit for me to get my head around for the time being. the helps appreciated much tho, would prefer to to use your method once i've gotten used to the programme, its seems a better method which also answers a question I was about to ask, if I used a restorative item "Ointment" to cure the staus condition, how would I go about resetting variable so the common event would continue upon treatment?
Make an item and make it a "Switch" type. Attach a switch to it called "Ointment" or something, then go to your common events and make a common event (Auto-Start or Parallel Process) that will activate when that switch is activated. In this common event, have it remove the Sunburn condition and also reset the variable you used to keep track of seconds in your other common event to 0. At the end, make sure to deactivate the switch "Ointment." You may want to include a message or something to say that Sunburn was cured, but that, of course, is completely up to you.

Of course, this is only really helpful if you only have one party member or you make it so the ointment removes Sunburned from the whole party. If you made it so the Ointment only works on one party member and you have multiple members, you would have some more complicated coding to do, haha. :]

EDIT: In response to your question about just resetting the variables and whatnot, you have to ensure that the common event you created to check time & inflict the sunburn is not active while you're not in the beach. So, just make sure to turn the switch that makes it run OFF and then reset the variables associated with it too.
post=145579
Make an item and make it a "Switch" type. Attach a switch to it called "Ointment" or something, then go to your common events and make a common event (Auto-Start or Parallel Process) that will activate when that switch is activated. In this common event, have it remove the Sunburn condition and also reset the variable you used to keep track of seconds in your other common event to 0. At the end, make sure to deactivate the switch "Ointment." You may want to include a message or something to say that Sunburn was cured, but that, of course, is completely up to you.

Of course, this is only really helpful if you only have one party member or you make it so the ointment removes Sunburned from the whole party. If you made it so the Ointment only works on one party member and you have multiple members, you would have some more complicated coding to do, haha. :]

EDIT: In response to your question about just resetting the variables and whatnot, you have to ensure that the common event you created to check time & inflict the sunburn is not active while you're not in the beach. So, just make sure to turn the switch that makes it run OFF and then reset the variables associated with it too.


Hmmm yeah i was thinking of using the ointment as a switch item but like you've said. it'll be a whole party cure item rather than a single party member (which is what i wanted initially) and it'll be more complicated if it were to remove sunburn on only a single party member.

And yupp, i've put a switch to turn the common event when leaving the area and added the variable reset command. Psy wombats method would be a better option if I were to make the ointment a single person cure item though but what the hey.

Again, thanks for all the help!
post=145587
It'll be a whole party cure item rather than a single party member (which is what i wanted initially) and it'll be more complicated if it were to remove sunburn on only a single party member.


That sounds a bit more realistic, since one person doesn't need a whole bottle of suntan lotion (unless you allow multiple uses).
post=145785
post=145587
It'll be a whole party cure item rather than a single party member (which is what i wanted initially) and it'll be more complicated if it were to remove sunburn on only a single party member.
That sounds a bit more realistic, since one person doesn't need a whole bottle of suntan lotion (unless you allow multiple uses).


Yeah thats true.....I've since scrapped he idea of an item for now and just made an NPC on the beach that lets you use her suntan lotion, making the player really watch how much time is spent on the said area (as they'll have to keep going to the NPC if they're afflicted with sunburn, which sounds annoying) until a beach umbrella is found.
Max McGee
with sorrow down past the fence
9159
what does the sunburn actually do again?

(did not read the topic carefully)
Last time I was sunburned, my agility was like -8.
post=146554
what does the sunburn actually do again?

(did not read the topic carefully)

I dont think I stated it. well I guess when you get sunburnt it fuckin hurts when you touch it or move around quite a bit so I guess half def and atk(or even lower)? Lowering agility would fit a sunburn condition too.
Max McGee
with sorrow down past the fence
9159
What?

Um...I HOPE that if you have a status effect like being horribly poisoned, burning alive, blind, or magically cursed that it is proportionally worse because all of those things are worse than like....a sunburn...(although a really bad sunburn really sucks believe me I know my pale Polish-Irish skin is incapable of tanning)
post=146961
What?

Um...I HOPE that if you have a status effect like being horribly poisoned, burning alive, blind, or magically cursed that it is proportionally worse because all of those things are worse than like....a sunburn...(although a really bad sunburn really sucks believe me I know my pale Polish-Irish skin is incapable of tanning)[/quot

Haha true well it'll prob jus lower def/agil. An yeah obviously it'll be a really bad sunburn otherwise if ti was to be a minor burn ther'd be no point in adding this stat effect. But gunna have a mess around and see what else I could come up with instead of stat lowering. BTW man lookin forward to playing To Arms!
Max McGee
with sorrow down past the fence
9159
well, that's one person. : )

btw your post got trapped in a quote
Pages: first 12 next last