TPASMALL'S PROFILE
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?
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?
how do you call the enemies troop number while scripting in vx?
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.