Page 1 of 2

New topic, got a question 'bout modding, post it!

Posted: 26 Aug 2006, 02:36
by Snipawolf
I got a question, is it possible to make a unit wait 3 mins for its death explosion? Ex - Death Stinger dies, in the actual show, a zoid would explode after a while if left alone, if attacked it may explode faster... A zoid core explosion is equivalent to a nuke, and its gunna be big, so they need some time to get the hell away, or their ignorance shall pwn themselves! :twisted:

And like I said in the topic, IF YOU HAVE A MODDING QUESTION, POST IT HERE! Or an answer to a question in this topic..

Posted: 26 Aug 2006, 02:44
by Argh
The short version is, "yes".

The long version is, "Yes, but you need to Call-Script X()" where X is the name of your fancy death animation, and then when the script returns, the unit is now completely dead.

Can you do things like have it shoot randomly while it dies? No. It's already dead when the script is running. Nor will it move. But you can make it slowly twitch, lose random parts... or whatever... while it's dying, yes... definately.

Posted: 26 Aug 2006, 02:51
by Snipawolf
YESSS! I will also have random twitches :P

Then, anybody ignorant enough not to know why it stays there for like 3 mins will soon find out :twisted:

Edit: Also, where the hell do I put my side pics (16x16 or something like that)

Posted: 26 Aug 2006, 07:56
by KDR_11k
No, the ExplodeAs explosion is triggered the moment the unit hits zero HP. The Killed() function can take its time and wait a bit until returning which keeps the unit on the field until Killed() returns. The unit won't do anything in that state except play animations (its HP bar turns blue so I suppose it's stunned) but other units won't notice it's dead and keep firing at it until it disappears.

Argh: There's no need for a separate funtion there, you can just write all of that into your Killed() function.

Posted: 26 Aug 2006, 08:56
by Argh
Hmm... he might be able to make the explosion take a veeeeery long time to expand, though... good for things that die "on fire" whatever... I guess the "3-minute BOOM" thing is just visual for the moment though. Ah well, that will change.

Posted: 26 Aug 2006, 13:45
by KDR_11k
Oh, I can think of a question now: How do you emit that stream of smoke that e.g. LRPCs cause when shooting? Does that happen when you emit smoke from a piece named flare* or is there a separate SFXTYPE for that?

Posted: 26 Aug 2006, 14:05
by Argh
Well, the LRPC one is called by Show/Hide Piece in the COB. Hopefully that's going bye-bye soon. The type of "flash" and smoke is determined by Default damage, just like a whole bunch of other things (grrrrr).

And then in NanoBlobs I have some faking-it things I did, which you can go see for yourself ;)

Posted: 26 Aug 2006, 14:12
by KDR_11k
So if I unhide a piece called flare it produces that smoke?

Posted: 26 Aug 2006, 15:36
by Caydr
Is there a get HP function yet?

You could set it to get the HP, and if the HP falls below a certain threshold, it begins its slow death sequence and has its maxspeed set to 0, ending in setting the HP to 0, killing it. It would remain a unit all that time and could do anything a unit can do, like for instance firing randomly.

Posted: 26 Aug 2006, 15:41
by KDR_11k
get HEALTH, standard OTA feature IIRC, returns the HP in percent. Unfortunately not settable.

Posted: 26 Aug 2006, 16:10
by VonGratz
KDR_11k wrote:So if I unhide a piece called flare it produces that smoke?
I think that startsmoke=1; tag in the weapon file would be useful.
VonGratz :wink:

Posted: 26 Aug 2006, 16:25
by KDR_11k
Hm, I don't necessarily want to associate it with a weapon.

Posted: 26 Aug 2006, 16:42
by Snipawolf
Snipawolf wrote:YESSS! I will also have random twitches :P

Then, anybody ignorant enough not to know why it stays there for like 3 mins will soon find out :twisted:

Edit: Also, where the hell do I put my side pics (16x16 or something like that)
Quoting myself, I will ask a new question, is it possible ( I don't care how hard the script will be) to make it have a timer of 3 mins, and everytime it is shot it depletes a second? :twisted:

Posted: 26 Aug 2006, 16:45
by Guessmyname
Yes, I'd think so. Using a static-var that goes down by one every second, and using hitbyweapon() to detect when hit and deduct an extra second.

It won't be able to tell the damage of a weapon though. It could be a tiny little rifle or a big nuke, it'd still deduct only one extra second

Posted: 26 Aug 2006, 16:46
by Snipawolf
Doesn't matter, I really wouldn't care XD

Send a machinegunner over to "finish the job" lol

Edit:
And Apparently, its a little more flexible than I thought :P

Posted: 26 Aug 2006, 17:15
by KDR_11k
Noone would bother trying to "finish off" a unit that's already dead. Also keep in mind that the method Caydr suggested won't work, you can't destroy the unit from its script. It's dead the moment its HP fall to zero and that's when it explodes, anything after that is just cosmetic.

Posted: 26 Aug 2006, 17:23
by Snipawolf
Ahhh, I got an idea then...

Hp drops to about 10 percent or so and it becomes immobile, weapons hardly work and have terrible accuracy, and its armor class would change (hopefully) and allow it to take like .3 damage from a bunch of stuff, and anyone stupid enough to try to destroy it from there... Is just stupid :P

This way, a script won't make it die, somebodies stupidity (or intelligence perhaps, depending oh hows its used...) could make it into a deadly mine...

But, if you don't destroy it... It has a regen, once it gets back up to 30 percent or so, well, you know what happens :twisted:

Posted: 26 Aug 2006, 17:50
by KDR_11k
So, what do you do if one of those things attacks your base?

Posted: 26 Aug 2006, 18:46
by Snipawolf
Don't let it get built... Simple enough...

Orrr, the much much longer method...

Reclaim it... Get under it and reclaim it...

Posted: 26 Aug 2006, 21:59
by KDR_11k
"Don't let it get built" is a pretty lame excuse for bad balancing...