03-02-2008, 07:54 AM (This post was last modified: 09-02-2024, 08:09 PM by DerVVulfman.)
Veiw Range Script
Version: 1 & 2
by Jaime 'Near Fantastica' Webster Not DerVVulfman
and Version: 3 Eta
Edit by DerVVulfman
Features
Lets events see the player and interact with it in different ways depending on how close the player is
To add this script make a script call it View_Range and add the following into it then call it accordingly with a script call
Can handle BGS effects
By the poster
I didn't create the original scripts, and as of now the links that Near Fantastica put up are down (and he can't get to them) and his RMXP system is down. Given that he posted the original (though broken) demo links here, there should be no problem to post the script.
I tinkered with the system and made a version 3 (still tinkering :) ) that combines the best features of both... and a little more.
To call BGS add this script call for events: $view_range.event_sound(event_id, bgs_name)
This script call lets you check within the area of a circle around the event for the player and calculates the level of the volume to play the BGS at.
To use events to perform a check within an area of a circle and trigger an RMXP Switch: $view_range.enemies_view(event_id, view_range, switch_id)
This script call lets you check within the area of a circle for an event. It will return true if the player is in the events view range.
To call the enemies add this script call for enemies: $view_range.enemies_view(event_id, view_range, switch_id)
This script call lets you check within the area of a semi circle in front of the event for the player if true the player is in the enemy's view range.
Syntax
Event ID is the events id which the script call is placed from
View Range is how far the event can see
BGS Name is the name of BGS you want the event to play: example "010-River01"
switch_id is the default RMXP switch id that can be used in various Event commands.
For version 2
To call BGS add this script call for events: $view_range.event_sound(event_id, bgs_name)
This script call lets you check within the area of a circle around the event for the player and calculates the level of the volume to play the BGS at?�
To call the enemies add this script call for enemies: $view_range.enemies_view(event_id, view_range, switch_id)
This script call lets you check within the area of a semi circle in front of the event for the player if true the player is in the events view range.
Syntax
Event ID is the events id which the script call is placed from
View Range is how far the event can see
BGS Name is the name of BGS you want the event to play: example "010-River01"
switch_id is which local switch you want to set on... example "A", "B", "C", "D"
For version 3
Plenty more instruction in the script... Feeling lazy right now. [/list]
Take Care,
Near
Enjoy,
Mike aka DerVVulfman
* - * - * - * - * - *
Version 3 Eta
I included built in instructions that allow you to use local self-switches and global RMXP switches, as well as being able to control the volume when using the event_sound call. Also, the system's 'view' calls now includes an optional switch so impassable tiles can 'block' the view/detection system.