OnKilled

Everything about mods can be found here.

Moderator: Morax

OnKilled

Postby warpie » 08 Sep 2015, 03:56

Hello there all,

I was trying todo something

Code: Select all
OnKilled = function(self, instigator, overkillRatio)

         local bp = self:GetBlueprint()
         local pos = self:GetPosition()

         
         ForkThread(function()
         
         WaitSeconds(2.5)         
         CreateUnitHPR(
            buildUnit,
            XSB1301,
            pos[1], pos[2], pos[3],
            0, 0, 0
         )   
         self:Destroy()
         end)
         
         end
      end
      
    end,



But it don't work
it goos wrong but i dont see it , can sombody help me?
User avatar
warpie
Crusader
 
Posts: 37
Joined: 08 Aug 2015, 17:33
Has liked: 2 times
Been liked: 2 times
FAF User Name: warpie

Re: OnKilled

Postby quark036 » 08 Sep 2015, 15:44

What does the log show? Where are you using this (ie, is this a replacement for the onkilled in unit.lua, or is it in a specific unit)? For most cases, you probably want to call the default OnKilled as well to make sure that it does all the stuff that needs to do.
quark036
Avatar-of-War
 
Posts: 165
Joined: 11 Mar 2015, 03:17
Has liked: 10 times
Been liked: 26 times
FAF User Name: Quark036

Re: OnKilled

Postby warpie » 08 Sep 2015, 23:33

I made a copy of the xsb1301 T3 power generator changde it to xsb13010 for buildable T1 with a little change and name it power generator extreme
so far so good
If the power generator is destroyed i like create xsl0402 unidentified residual energy signature
but to test i choose the normal xsb1301 T3 power generator ( the normal power gen. come in place after the kill of the power extreme)
( Now i have change the code to the xsl0402 unidentified residual energy signature
User avatar
warpie
Crusader
 
Posts: 37
Joined: 08 Aug 2015, 17:33
Has liked: 2 times
Been liked: 2 times
FAF User Name: warpie

Re: OnKilled

Postby warpie » 11 Sep 2015, 02:55

adding edit :
edit wrote:well I found it just out :D with a bug xD little cool bug
So the power generator os destroyed but the normal building stays and add the Wreckage
if you reclaim it you see the normal building back
it will be cool if the normal and Wreckage be gone after the reclaim xD

a question: what program it is best to film what you see on your pc screen?
User avatar
warpie
Crusader
 
Posts: 37
Joined: 08 Aug 2015, 17:33
Has liked: 2 times
Been liked: 2 times
FAF User Name: warpie

Re: OnKilled

Postby nine2 » 11 Sep 2015, 03:44

there are zillions of programs. i use ffsplit ... free and works nice. Then i upload to youtube
nine2
Councillor - Promotion
 
Posts: 2416
Joined: 16 Apr 2013, 10:10
Has liked: 285 times
Been liked: 515 times
FAF User Name: Anihilnine

Re: OnKilled

Postby warpie » 11 Sep 2015, 04:01

Aah thx buddy, now i can show the progress on YouTube later xO oh lol that will by my first video ever xp, wish me luck
User avatar
warpie
Crusader
 
Posts: 37
Joined: 08 Aug 2015, 17:33
Has liked: 2 times
Been liked: 2 times
FAF User Name: warpie

Re: OnKilled

Postby nine2 » 11 Sep 2015, 12:58

Gl hf
nine2
Councillor - Promotion
 
Posts: 2416
Joined: 16 Apr 2013, 10:10
Has liked: 285 times
Been liked: 515 times
FAF User Name: Anihilnine

Re: OnKilled

Postby warpie » 18 Sep 2015, 01:03

So have made a little movie
https://www.youtube.com/watch?v=El30M96VCTg
Sorry for the sound, lol I have plugged the earphone into the microphone connector to bypass,
becaus the FFsplit don't show the default win playback device... and don't found my microphone
( but after this video its was back ok for the sound )


so :
warpie wrote:adding edit :
edit wrote:well I found it just out :D with a bug xD little cool bug
So the power generator is destroyed but the normal building stays and add the Wreckage
if you reclaim it you see the normal building back
and you can't build over it.
It will be cool if the normal and Wreckage be gone after the reclaim xD


edit : addlink
User avatar
warpie
Crusader
 
Posts: 37
Joined: 08 Aug 2015, 17:33
Has liked: 2 times
Been liked: 2 times
FAF User Name: warpie

Re: OnKilled

Postby warpie » 03 Oct 2016, 11:26

Hi Every One :D
Long time no see he ( 1year ago )

I am been little busy ect :)
When I find time I try to continue working on the mods

like now I fixed my bug here and its working good :D
Attachments
supcomfa-mod-warpie.jpg
supcomfa-mod-warpie.jpg (535.33 KiB) Viewed 2327 times
User avatar
warpie
Crusader
 
Posts: 37
Joined: 08 Aug 2015, 17:33
Has liked: 2 times
Been liked: 2 times
FAF User Name: warpie


Return to Mods & Tools

Who is online

Users browsing this forum: No registered users and 1 guest