run (whatever) on self-destruct sequence begun

run (whatever) on self-destruct sequence begun

Requests for features in the spring code.

Moderator: Moderators

User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

run (whatever) on self-destruct sequence begun

Post by Caydr »

What the subject says... the ability to have a script automatically run when self-d process has started. A second script would begin if the self-destruct was terminated.
User avatar
Peet
Malcontent
Posts: 4384
Joined: 27 Feb 2006, 22:04

Post by Peet »

Most likely possible with luacob.
User avatar
Zoy64
Posts: 454
Joined: 12 Nov 2006, 00:30

Post by Zoy64 »

what happens if you set Self-D and the targeted units runs......into your own base?! And by the time that you tell him to stop Self-D-ing.....

KABOOOM!
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Post by Caydr »

Zoy64 wrote:what happens if you set Self-D and the targeted units runs......into your own base?! And by the time that you tell him to stop Self-D-ing.....

KABOOOM!
:|

So ANYWAY, can someone decribe how this is done with "luacob"? To take a guess, "Luacob" involves LUA, which I can't read, and cob, which I can't write.
manored
Posts: 3179
Joined: 15 Nov 2006, 00:37

Post by manored »

Script to make a lot of red lights pop out of the unit while its head spins around madly and it yells "DANGER! DANGER! DANGER!" ? It would be fun to watch :)

But talking serious now, where you want to use that on?
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Post by Caydr »

I thought it'd be useful for a certain unit to give a visual indication when it's going to self-destruct, to both allies and enemies.
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Post by Caydr »

*rez*

If this is possible, can someone show me how to implement it? I can't emphasize enough how much it'd improve a certain something I'm working on.
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Post by imbaczek »

e-z. look at caspring to see how it's done these days. maybe even perhaps *gasp* ask them ^^
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Post by Caydr »

I have no idea what's going on with CA... I'm purposefully avoiding looking at it so I can keep my ideas original. They have a unit like this already?
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

On AllowCommand for Self-D make a COB call.
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Post by Caydr »

:shock:

Can you post a working bit of code? I really have no idea how to make this LUA stuff, I can just modify what I already have. Once I get my shift change I'll have to learn LUA...
manored
Posts: 3179
Joined: 15 Nov 2006, 00:37

Post by manored »

I dont think that a suiciding unit should show that it is going to make boom... its just activating a bomb into itself, isnt it? And the 5 or 10 seconds of antecipation are just for the case of you incidentally pressing the self-d button (or so I think). And its even weird that all units can self-d: True that everone should have the ability to eliminate the own units, but isnt it a bit expensive to give all units a bomb to selfdestruction? :)
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Post by Caydr »

This isn't intended for conventional "oh no my AK is going to be captured! I'll be ruined! wait a minute.... *ctrl+d" HAHAHAHA I WIN!!!" scenarios.
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Post by Caydr »

Please can someone post a working example? I'm really desperate, I've got this great idea that could be made exponentially better by showing when self-d has started.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Post by Forboding Angel »

manored wrote:I dont think that a suiciding unit should show that it is going to make boom... its just activating a bomb into itself, isnt it? And the 5 or 10 seconds of antecipation are just for the case of you incidentally pressing the self-d button (or so I think). And its even weird that all units can self-d: True that everone should have the ability to eliminate the own units, but isnt it a bit expensive to give all units a bomb to selfdestruction? :)
No offense manored... but who are you to tell us what features we want to have in our mods?
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Post by Caydr »

He's a potential helper, which makes him god for the duration of this thread (or until I find someone better ^^)
User avatar
SwiftSpear
Classic Community Lead
Posts: 7287
Joined: 12 Aug 2005, 09:29

Post by SwiftSpear »

Why not just have it possible to override the self-d sequence entirely and replace it with your own scripted sequence triggered by ctrl-d. I imagine the majority of mods would maintain the self-d sequence for all units, but I know some mods basically don't allow self-d at all currently, so why force them to use cudgeled work arounds when it should really be replaceable entirely anyways?
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

CommandFallback or something like that.
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Post by Caydr »

I would gladly try that if I knew how. Can someone give me some example code to work with?
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Post by trepan »

CommandFallback() only works for commands that the engine does
not recognize. You can intercept the real SELFD commands with the
AllowCommand() call-in, and insert your own custom commands if
you want to use CommandFallback(). This might be useful if you want
to allow using queued custom selfd's.
Post Reply

Return to “Feature Requests”