Bombs killing friendlies!?! -1 reply

  • 1
  • 2

Please wait...

Sidious Invader

Dark Lord Of The Sith

50 XP

9th January 2007

0 Uploads

853 Posts

0 Threads

#1 10 years ago

I know many people have asked if bombs can affect friendly units, as explosions don't just hurt enemies, but everything in it's range. Well I finally figured that one out. I used Boba Fetts harmonic bomb, and attached a lua script to the projectile... Hostile Put that line in the "Harmonic" bombs unit code. Heres the .lua script, copy it to notepad, then save it as Hostile.lua in the SWFOC\DATA\SCRIPTS\GAMEOBJECT\ folder....

--///////////////////////////////////////////////////////////////////////////////////////////////// --Hostile by Sidious Invader. --///////////////////////////////////////////////////////////////////////////////////////////////// require("PGStateMachine") require("PGStoryMode") function Definitions() DebugMessage("%s -- In Definitions", tostring(Script)) Define_State("State_Init", State_Init); end function State_Init(message) if message == OnEnter then hostile = Find_Player("Hostile") closest_target = Find_First_Object("Proj_Harmonic_Bomb_Slave_I3") closest_target.Change_Owner(hostile) end end

Now, all this script really does is change it's faction from Empire(Boba's faction) to faction "Hostile" after it's created(dropped.) Then bam all units in it's blast radius are damaged, including Boba Fett! Hope you like it!!




Guest

I didn't make it!

0 XP

 
#2 10 years ago

Yay that's some cool code!! Although I'm probably not going to use this in game, it's some cool stuff to learn from^^




Filo

.

50 XP

23rd August 2007

0 Uploads

776 Posts

0 Threads

#3 10 years ago

:bows::bows::bows: <- that's speaking for itself, I suppose




xanofar

Back from the dead!

50 XP

15th April 2008

0 Uploads

783 Posts

0 Threads

#4 10 years ago

I can't imagine what I'd use this for, but nice job. :)




Filo

.

50 XP

23rd August 2007

0 Uploads

776 Posts

0 Threads

#5 10 years ago

For realism, my friend. How does it look like when bombardment smashes everything in sight but your units don't even get scratched?




Guest

I didn't make it!

0 XP

 
#6 10 years ago

daang! i dig your style. ahah. ima use it. thank youu man.bows.gifbows.gif




Guest

I didn't make it!

0 XP

 
#7 10 years ago

I have been pissed of about the frendly fire issue since the game came out,that changes today :D




xanofar

Back from the dead!

50 XP

15th April 2008

0 Uploads

783 Posts

0 Threads

#8 10 years ago
Filo;4564819For realism, my friend. How does it look like when bombardment smashes everything in sight but your units don't even get scratched?

Yeah, well I'm a cheap bastard, and I prefer clumping lots of area effect attacks against my foes. :p




Vaders_legion

NO U

50 XP

17th December 2005

0 Uploads

1,006 Posts

0 Threads

#9 10 years ago

Alast, some more quality work from SI. Now one question, can it find multiple harmonic bomb projectiles/objects?




Sidious Invader

Dark Lord Of The Sith

50 XP

9th January 2007

0 Uploads

853 Posts

0 Threads

#10 10 years ago

Yeah, in the code instead of Find_First_Object(), I should have used Find_All_Objects_Of_Type().




  • 1
  • 2