Couple questions about ATES

Started by [Faint], September 22, 2009, 11:04:47 pm

Previous topic - Next topic

[Faint]

Ok my questions are related to Blizzards ATES. Please keep in mind I am new to rmxp and I am just learning the basics of RGSS and eventing.

1) How would I go about having an event check the time like if the time equals 8..12 they can enter a certain building, if not then they can't enter.


2) How would I display the time from this script in the menu instead of the play time.
Scripts by me - State Requirement Skills
current project - Project: AURA

Jackolas

September 23, 2009, 03:30:08 am #1 Last Edit: September 23, 2009, 09:59:56 am by Jackolas
1)
-add to the event a Conditional Branch
-go to tap 4 and do script
-than enter: $game_system.ates.time.hour > "time"

("time" is of course the time you want etc)
you can change the > in whatever you need
you get the idea I hope :P

so a conditional Branch for 8..12 would look like:
Spoiler: ShowHide


2) look for something in your menu script like:
      # Make a string for displaying the timer
     min = @total_sec / 60
     sec = @total_sec % 60
     text = sprintf("%02d:%02d", min, sec)

(This is Sprite_Timer if you don't use a custom menu)

and replace with:
      # Make a string for displaying the timer
   hour = $game_system.ates.time.hour
   min = $game_system.ates.time.min
   text = t.strftime("%02d:%02d", hour, min)  

should do the trick
remember to have the ATES script on because else it will crash

[Faint]

Alright thanks a bunch for that but i have 1 more question. How do you make the time pause while you are indoors?


And maybe you can answer this other question also. How can you have an event check if a player is within 1 tile of it?


Example I have a conditional branch that has  Input.trigger?(Input::Z)  and I only want it to respond when the player/actor is within 1 tile of it.
Scripts by me - State Requirement Skills
current project - Project: AURA

Jackolas

September 24, 2009, 03:02:43 am #3 Last Edit: September 24, 2009, 03:05:08 am by Jackolas
1) you can stop time and contineu it with a call script commend in the event command page (page 3, right bottom)
there add the line
ATES.off
or
ATES.on

apply it when you go true doors. simple as that
also to turn tinting on and off (like day and night time) use:
ATES.tint_off and ATES.tint_on

2) to have an event trigger we normally don't use conditional branches
if you have the event page in front of you you will see on the left side in the bottom the Trigger
change it to action button to activate it when you press the action key
if you want to activate it with 1 tile in between use an invisible event in front of it. (with the same action)

[Faint]

I was using a conditional branch because I was having a different button set for using a form of tools and I wanted it to check if the button was pressed then it would take away from the sp and do the rest of the event but I have all that figured out I just cant figure out how to make it where it only checks the condition if the player is in the next tile over (from any side of it) as it stands right now if I push the button I have assigned in the conditional branch i can activate it from anywhere on the map.
Scripts by me - State Requirement Skills
current project - Project: AURA