TPASMALL'S PROFILE

Nerd.
The Arms of Reverie
The world is divided by a great darkness known as the Nebula. The Dark forces, led by an Evil Prince are trying to gain control of an ancient power and finish war that began over a thousand years ago.

Search

Filter

how do you call the enemies troop number while scripting in vx?

I tried that, but it wasn't what I needed. I've been watching scripting tutorials and finally figured it out. I had to set @troop_id as attr_accessor in game troop. The script I made will be available soon! Thanks for the help though!

how do you call the enemies troop number while scripting in vx?

I'm not sure I understand what you mean (I'm like brand new to ruby, as in just started messing with it 2 days ago, ha).

how do you call the enemies troop number while scripting in vx?

so this is the point i've gotten to. this is the formula that gets the number i need.

def make_encounter_troop_id
encounter_list = $game_map.encounter_list.clone
for area in $data_areas.values
encounter_list += area.encounter_list if in_area?(area)
end
if encounter_list.empty?
make_encounter_count
return 0
end
return encounter_list(rand(encounter_list.size))
end


when i call game_player.make_encounter_troop_id though, it re-runs this formula instead of giving me its value. any idea on how i can get the value from the first time it was run without running the formula a second time?

VX questions

yep, when you do "set move route" just select the event you want to move from the drop down menu. You can control everything from one event, it helps keep things organized and easier to troubleshoot.

VX questions

Another way to do step 2 is to make the event with no graphic, then set the graphic when he enters the screen.

how do you call the enemies troop number while scripting in vx?

nevermind, that only works if a map only has one troop on it :-/

how do you call the enemies troop number while scripting in vx?

I figured it out!

$game_player.make_encounter_troop_id

how do you call the enemies troop number while scripting in vx?

I'm trying to get a variable 'troopidnumber' to equal what the troops number is in the index. So when battle starts if troop 1 is slime x 2, I want my variable 'troopidnumber' to equal 1.

how do you call the enemies troop number while scripting in vx?

I'm attempting to make a script and I need to use the troop number as a variable. Any ideas on how to do this?

I've tried:
$game_troop.troop_id
and
$game_enemy.index

but neither of those seem to work.