Jump to content

Scripting Tutorial 8 - Ion Cannon and Nuke (from C&C '95)


Ransom

Recommended Posts

  • Replies 59
  • Created
  • Last Reply

Top Posters In This Topic

  • 2 weeks later...

When im thinking of a nuke there normally is a huge shockwave around the explosion so i thought of an inner radius where as ransom said everybody gets killed instantly and an outer radius where you fly about 5 meters or so backwards and you get a little life substraction to imitate this shockwave.

So my question is if there is a possebility to let the players in this radius fly backwards onto their back or when this doesnt look smooth to let them simply fall to the ground.

Link to comment
When im thinking of a nuke there normally is a huge shockwave around the explosion so i thought of an inner radius where as ransom said everybody gets killed instantly and an outer radius where you fly about 5 meters or so backwards and you get a little life substraction to imitate this shockwave.

So my question is if there is a possebility to let the players in this radius fly backwards onto their back or when this doesnt look smooth to let them simply fall to the ground.

Yeah, that's possible

Link to comment
  • 4 weeks later...
  • 3 weeks later...
  • 2 months later...

I think I have missed something here... I get this:

[16:12:02] WARNING: script8b.nuke.lua: Bad argument @ 'addEventHandler' - Line: 20

[16:12:02] WARNING: script8b.nuke.lua: Bad argument @ 'addEventHandler' - Line: 30

[16:12:02] WARNING: script8b.nuke.lua: Bad argument @ 'addEventHandler' - Line: 69

I can't launch the nuke when I press the G key. Same with the Ion Cannon.

Maybe it's not the script, maybe it's something else, but I don't know..

I am new to both MTA SA Servers and Lua scripting...

Help?

Link to comment

The script is outdated to the current system. Mainly, event handlers go below the functions, not above them. I have yet to fix this script. The glow function will not work anymore because it must be rewritten. It spammed timer calls serverside. Timers are now protected with a minimum call time to prevent spamming like I did. This was done for obvious reasons. Sloppy coding is frowned upon. It will need to be taken care of clientSide with onClientRender, which will look much cleaner.

Sorry it is not 100% functional atm.

Link to comment
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...