probpe":183u0ndf said:
Gubid":183u0ndf said:
1. $scene.set_character("actor", ID, X, Y, ENTRY_ANIM_ID = 0).. also accepts "enemy" and "neutral". This is the summon method, but I expanded it to have the ability to add whatever type you want. This is partially for the Advance Wars addon for this... eventually.
Where do i have to add that method ??
This is the method to add character/enemies/neutrals to the map if you desire. To use this.. open an event.. battle event or whatever. tell it to run a script and put the above code you quoted in the script. It will add the actor/enemy of the ID you specify at the x,y and use the animation you specify. If none, they will simply appear.
trainspotter,
you found something I missed. There is no way to do this for enemies... I guess we will have to setup something... probably in the enemy class/level section to define if they should have the flying state applied when they join the battle. Would be fairly easy to do. Just add a
def can_fly?
case @id #(this being the enemy_id)
when 1; return true
else; return false
end
end
Then you will need to have it check the enemies as they are added...
search "def battle_begin", then find "$game_system.tactics_enemies.push(enemy)", in mine its line 333, but I have made adjustments.. might be close to there though. Add a line right before this saying...
enemy.add_state(18,true) if enemy.can_fly?
Now if you want to update also the above method that probpe needs to use... about line 3749..
find
if actor != nil
$game_system.tactics_enemies.push(Game_Enemy.new(@troop_id, index))
$game_system.tactics_enemies.last.moveto(x, y)
@spriteset.battler_sprites.push(Sprite_Battler.new(@spriteset.viewport1, actor))
end
and replace it with
if actor != nil
en = Game_Enemy.new(@troop_id, index)
en.moveto(x, y)
en.add_state(18,true) if en.can_fly?
$game_system.tactics_enemies.push(en)
@spriteset.battler_sprites.push(Sprite_Battler.new(@spriteset.viewport1, actor))
end
That should handle it. actors should be able to have auto states, which means neutrals are ok, but these are the only 2 places that an enemy is added to the map or any similar method is used.
Please let me know if you have any questions or problems.
Larynni
I have to know what error you are receiving to be able to help.. but I think you likely added the unless right above the line instead of after it. This means that it didnt close.. you have to add an end after you finish the "unless" statement.
Dung_Beetle
When i have some time I will give it a look. You are looking for dual wield and 2 sword abilities, right?
Tylord
It might have been a change in the get_targets method that might be malfunctioning. I will look into it.