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

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

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

User avatar
Snipawolf
Posts: 4357
Joined: 12 Dec 2005, 01:49

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

Post 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..
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post 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.
User avatar
Snipawolf
Posts: 4357
Joined: 12 Dec 2005, 01:49

Post 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)
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post 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.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post 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.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post 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?
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post 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 ;)
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

So if I unhide a piece called flare it produces that smoke?
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Post 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.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

get HEALTH, standard OTA feature IIRC, returns the HP in percent. Unfortunately not settable.
User avatar
VonGratz
Posts: 471
Joined: 03 May 2005, 05:25

Post 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:
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

Hm, I don't necessarily want to associate it with a weapon.
User avatar
Snipawolf
Posts: 4357
Joined: 12 Dec 2005, 01:49

Post 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:
User avatar
Guessmyname
Posts: 3301
Joined: 28 Apr 2005, 21:07

Post 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
User avatar
Snipawolf
Posts: 4357
Joined: 12 Dec 2005, 01:49

Post 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
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post 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.
User avatar
Snipawolf
Posts: 4357
Joined: 12 Dec 2005, 01:49

Post 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:
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

So, what do you do if one of those things attacks your base?
User avatar
Snipawolf
Posts: 4357
Joined: 12 Dec 2005, 01:49

Post by Snipawolf »

Don't let it get built... Simple enough...

Orrr, the much much longer method...

Reclaim it... Get under it and reclaim it...
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

"Don't let it get built" is a pretty lame excuse for bad balancing...
Post Reply

Return to “Game Development”