PDA

View Full Version : Nuke Move Behavior


MidnightGladius
01-03-2006, 8:14 PM
Hey,

I'm trying to get a weapon flingy to move like a Nuke does, going straight up from the point of origin (I'd like this to be the unit itself, if possible), waiting a few seconds, and then coming back down at the target's location.

I've done everything I've been able to think of, copying over the Iscript included. The result is that when my unit attacks, the game crashes. Is this possible, or hardcoded?

Thanks,
MG

SuiCidAl-KiSmEt
01-03-2006, 8:30 PM
Maybe you should try changing the Ai/Order in MemGraft; Nuke Train, Nuke Unit, Nuke Lunch, etc...

Frums-smurF
01-03-2006, 8:32 PM
that would be quite cool like is that the unit's movement or like attack?? jump attack?

loads_of_fun
01-03-2006, 10:35 PM
that would be quite cool like is that the unit's movement or like attack?? jump attack?its probly more along the lines of a BCs
heave orbital bombardmant with covental
ordinance

MidnightGladius
01-03-2006, 10:53 PM
Actually, it's for a cruise missile launcher. Nice guess, though.

rky_nick
01-09-2006, 8:47 AM
I believe if you wanted you could use the nuke itself.
nukes can be moved so it kinda depends on what exactly you want to do.

Aqo
01-09-2006, 12:15 PM
What will he use to replace the original nuke, than? ;)

Midnight - I already had the answer to this but forgot to post it; here it what you should do:
Using RetroGRP (gotta love that program) replace the target's independent overlay of your attack with the graphics of your missile, going from up to down. Than, use the 'Appear on Target' attack type in Arsenal. Go to the scripts of your mod, and add a second independent overlay that will appear after a short delay for the blast effect, and here you have it!
Err, just make sure you get the images.dat to use the default graphic for the missile!

I attached a mod to demonstrate (wraith's ground attack is a missile drop!).

BSTRhino
01-09-2006, 5:21 PM
Wow your avy looks cool AqoTrooper.

To be honest, I hadn't even thought of how to do it until I saw AqoTrooper's post there, that gave me an idea to do the same thing using iscript alone, without the RetroGRP part. Aren't forums great?

The iscript method might not necessarily be easier, so take your pick on what you would rather do.

First, the missile going down part would be easy. Like AqoTrooper said, you'd first need to set your missile behaviour to Appear on Target. Then in the death animation of the iscript, you could use shvertpos to make the missile go down vertically before it explodes and causes damage.

To do the missile going up part, you copy the images.dat entry of the missile to a new unused entry and use that as an image overlay when the unit attacks. Remember not to copy the iscript ID from the original missile over to the unused images.dat entry, just copy everything else, the only thing different between the two entries should be the iscript ID. In the iscript ID for the copied images.dat entry, you could make the missile go up using shvertpos again, and then make it disappear (using end) when it's finished. You would have to time the weapon graphic to appear and start going down after the going up image overlay has finished (using wait and tmprmgraphicstart/tmprmgraphicend).

Also, I forgot to say, playframno will set the direction of the missile. In iscript we talk about each image being able to face one of 32 directions, so playframno 0 will make a unit face upwards, while playframno 16 will make a unit face downwards.

One last thing, I believe the nuke moves that way because of its orders on the AI/orders tab. I suspect this is because if you use Junk Yard Dog on a nuke, it moves completely differently.

MidnightGladius
01-09-2006, 5:56 PM
Actually, the nuke orders/AI in A3 are very odd and don't use Nuke Train, Nuke Launch, or Nuke Unit at all...

Thanks for the advice, guys.

BSTRhino
01-09-2006, 6:17 PM
Well I get the idea that StarCraft sends the order in-game, I don't think it's set from units.dat.