[ACE] SAS IV Damage Enemy command within script

TheTowerfan

Veteran
Veteran
Joined
Oct 15, 2015
Messages
31
Reaction score
3
First Language
Eng
Primarily Uses
N/A
Hey guys, thank you in advance for the help.


I've reworked quite intensively SAS IV script from Khas, but I can't figure out one thing.


I need enemies to get damaged when they are in proximity of a ''bomb'' that's exploding.


We have the bomb (the icon gets placed when the player presses CTRL and goes 2 tiles ahead of the character, in the direction he's facing).


The bomb's coord are then stored in the variables 791 and 792.


After 2-3 seconds the bomb explodes.


if (Keys.trigger?:)L_CTRL))
if !$game_switches[997]
if !$game_switches[996]
if $game_switches[739]
$game_temp.reserve_common_event(102)
case $game_player.direction
when 2
$game_map.screen.pictures[1].show("[fixed]keg.png", 1, $game_player.x * 32, $game_player.y * 32, 100, 100, 255, 0)
$game_map.screen.pictures[1].move(1, $game_player.x * 32, ($game_player.y * 32) + 64, 100, 100, 255, 0, 15)
$game_variables[791]=$game_player.x
$game_variables[792]=$game_player.y + 2
when 4
$game_map.screen.pictures[1].show("[fixed]keg.png", 1, $game_player.x * 32, $game_player.y * 32, 100, 100, 255, 0)
$game_map.screen.pictures[1].move(1, ($game_player.x * 32) - 64, $game_player.y * 32, 100, 100, 255, 0, 15)
$game_variables[791]=$game_player.x - 2
$game_variables[792]=$game_player.y
when 6
$game_map.screen.pictures[1].show("[fixed]keg.png", 1, $game_player.x * 32, $game_player.y * 32, 100, 100, 255, 0)
$game_map.screen.pictures[1].move(1, ($game_player.x * 32) + 64, $game_player.y * 32, 100, 100, 255, 0, 15)
$game_variables[791]=$game_player.x + 2
$game_variables[792]=$game_player.y
when 8
$game_map.screen.pictures[1].show("[fixed]keg.png", 1, $game_player.x * 32, $game_player.y * 32, 100, 100, 255, 0)
$game_map.screen.pictures[1].move(1, $game_player.x * 32, ($game_player.y * 32) - 64, 100, 100, 255, 0, 15)
$game_variables[791]=$game_player.x
$game_variables[792]=$game_player.y - 2
end
end
end
end
end


But I have to resort to a Common Event Call to do the actual damage, and to have it work I need to place a ''call common event'' inside every enemy, running in parallel process.


Common Event


Command in Enemy (the ''Boom'' switch gets turned ON during the explosion, then it goes back OFF)


It would be 200 times better if I could implement it all in the SAS IV Script, so that I wouldn't have all the enemies call for the common event.


If anyone would be so kind to lend me a hand I would be verily inclined to pay for it
 
Last edited by a moderator:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.
Hello! I would like to know if there are any pluggings or any way to customize how battles look?
I was thinking that when you start the battle for it to appear the eyes of your characters and opponents sorta like Ace Attorney.
Sadly I don't know how that would be possible so I would be needing help! If you can help me in any way I would really apreciate it!
The biggest debate we need to complete on which is better, Waffles or Pancakes?
rux
How is it going? :D
Day 9 of giveaways! 8 prizes today :D

Forum statistics

Threads
106,051
Messages
1,018,549
Members
137,837
Latest member
Dabi
Top