Otto

Veteran
Veteran
Joined
Apr 24, 2015
Messages
119
Reaction score
70
First Language
Engilsh
Primarily Uses
RM2k3
'sup guys.
Wile taking a small break from my main, bigger, rm2k3 project, I'm working on some easy peasy stuff for rmvxa, and I'm working on a small hack&slash-like title that revolves around the XAS Active Battle System, which I think everybody knows ('tho I'll post the script down there for those who don't).

Now, wile the BS itself is pretty awesome and works perfectly with what I'm doing, it lacks a small feature that I could use, and that's the ability turn on one of the monster's event self switch when the latter is killed.

The script already provides you with the ability to turn on a specific switch, but considering those are very limited in VXA (it's not even the number of switches itself, because it's probably more than enough, but the way the system works, I would have to create X copies of the same enemy for each istance of said enemy in the game, and those ARE limited indeed), I wouldn't mind if I could activate selfswitches as well.

I think this require an addon script.
Alternatively, I guess i could edit somewhere in the script to modify what happens when the event get erased, to instead having it to turn on Self Switch C, since I don't plan on using the erase event funcion (or, to be specific, the event page that would be active when SelfSwitch C is on would take care of erasing the event)... this could actually be like a one-string editing, but still I have no clue what string to edit and what to put, since I'm just one inch above the "total noob" at scripting and I don't plan on learning rgss since I don't plan of doing much stuff with VXA anyway.

I wanted to post the script but apparently it's too long,
I'll link the official page (or whar I think it's the official page :p ) in the hope i'm not breaking any rule:
https://atelierrgss.wordpress.com/rgss3-xiderowg-action-system-xas/
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,305
Reaction score
11,734
First Language
English
Primarily Uses
RMVXA
You'll be pleased to know that giving a link was exactly the right thing to do. We always ask for a link, and not the script itself, because many scripters do not like their scripts being reposted, and it also ensures that anyone who needs to check it has access to any other info or discussion on the original web page which can help.
 

Otto

Veteran
Veteran
Joined
Apr 24, 2015
Messages
119
Reaction score
70
First Language
Engilsh
Primarily Uses
RM2k3
just giving this a small bump, 'tho I actually made some progress:
so I put this stuff somewhere in between the script

execute_active_switch(enemy)
execute_active_selfsw(enemy) #ghostino
execute_defeated_animation(enemy)


around line 5488 (it might be different because the script already has some modification made by me, to shoot ranged weapons from the "shield" slot) - where you see #ghostino is my edit.

A little bit down I put the following:

#---------------------------------------------------------------------------
# ● Execute Active Self Switch (Addon by ghostino)
#---------------------------------------------------------------------------
def execute_active_selfsw(enemy)
if enemy.note =~ /<Active SelfSwitch>/
$game_self_switches[[@map_id, 12, 'C']] = true
end
end

Pretty easy to understand: whenever an enemy with the <Active SelSwitch> notetag is killed, self-switch C of event 12 of the current map (@map_id) is turned on, and... it works! well... kinda :p

I know I'm kinda on the right path, but I need to understand what "code" to put instead of the number 12 to make the game understand that I'm refering to the event-monster I just killed. I already tried with @event_id, but didnt work.

Can anyone help me?
 

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,196
Reaction score
848
First Language
Hungarian
Primarily Uses
RMVXA
That should be a simple @id instead of @event_id.
 

Otto

Veteran
Veteran
Joined
Apr 24, 2015
Messages
119
Reaction score
70
First Language
Engilsh
Primarily Uses
RM2k3
That should be a simple @id instead of @event_id.

it worked!

man this was awesome, thanks a lot, you really helped me out :)
 

Latest Threads

Latest Profile Posts

Revamped the crew for my VN about thirty times. Only character that's stayed constant has been the fungus character. Guess it really grew on me...
I want to work on my reboot, but I don't have time to do it. ;_;
4y195n.png
big image so i posted it as a spoiler
Just a reminder to back your projects up. Do it now! :yamero:
If there was an award for best game dev procrastination, I'd say 'meh, I'll pick it up tomorrow' >_>
Honestly though, I've been staring at the same half-made map for a while now haha! Ahhh, I'm so tired of mapping!

Forum statistics

Threads
111,270
Messages
1,059,785
Members
144,567
Latest member
Sysce
Top