Attacking/Spellcasting Buildings
Posted: Sun Jan 04, 2015 2:08 pm
I came up with a method for adding new simple spells for units which doesn't have any other spells. Example: I gave dragoon a button for ensnare, but changed its icon and label to let's say NewSkill. Then added a spellcasting animation for dragoon, but instead of using the castspell opcode I used:
useweapon 108
wait 20
useweapon 84
The result was that dragoon got a spell that maelstormed enemy units and psi stormed them after a while. The cons of this are that it doesn't create a bullet, it doesn't show the energy cost when you point on the spell icon an if you want to change its energy cost you have to change ensnare's energy cost.
It was ok until I tried to force a building to cast ANY spell. All I was able to do was to make a photon cannon cast ensnare only while the target had the same looking direction. Then I tried with Xelnaga Temple and realised that I can't even remake it into an attacking building. Tried replacing it's .dat entries and iscript with photon cannons' and it made it attack only when an enemy was in its range, so if I wanted to attack a friendly unit or just change the target from one enemy or another it wouldn't react to my orders. Are attacking buildings hardcoded or what? The furthest I got was to make SC freeze when target got in the same direction as the temple.
tl;dr I want my XelNaga Temple to cast spells.
useweapon 108
wait 20
useweapon 84
The result was that dragoon got a spell that maelstormed enemy units and psi stormed them after a while. The cons of this are that it doesn't create a bullet, it doesn't show the energy cost when you point on the spell icon an if you want to change its energy cost you have to change ensnare's energy cost.
It was ok until I tried to force a building to cast ANY spell. All I was able to do was to make a photon cannon cast ensnare only while the target had the same looking direction. Then I tried with Xelnaga Temple and realised that I can't even remake it into an attacking building. Tried replacing it's .dat entries and iscript with photon cannons' and it made it attack only when an enemy was in its range, so if I wanted to attack a friendly unit or just change the target from one enemy or another it wouldn't react to my orders. Are attacking buildings hardcoded or what? The furthest I got was to make SC freeze when target got in the same direction as the temple.
tl;dr I want my XelNaga Temple to cast spells.