Author Topic: Weapon scripting system suggestion  (Read 1038 times)

0 Members and 1 Guest are viewing this topic.

Offline mxyzptlk

  • Veteran
  • *****
  • Posts: 1493
  • The Panda Ninja
Weapon scripting system suggestion
« on: April 25, 2007, 06:57:38 am »
I have been playing around with modding deus ex recently, and I noticed how versitile it is.
Late one night I was thinking about this, and I realised that it wouldn't be that hard to implement.

I came up with this syntax in my head.

This would not change Vanilla soldat at all. It would not touch the weapon stats unless it is told to. It would just be serverside, of course.


There would be two kinds of events:
Timed events (Think grenades)
and
Action events

For an example of action events, here would be the script for the M79:
Code: [Select]
LaunchProj         ///this script function would be at the beginning of every projectile script
Collide(Explode)           ///This function tells it that when it hits anything, it should explode.

Now, for more advanced scripting demonstrarion, I will show you what the grenade and shotgun scripts would be.

grenade:
Code: [Select]
LaunchProj
collide_player(explode)
T60: explode              ///This tells it that after 60 ticks, it explodes no matter what.

Shotgun:
Code: [Select]
LaunchProj[5]   ///this tells it that it launches 5 projectiles
Collide(Damage)

Deagles:
Code: [Select]
Launchproj[2]
Collide(damage)

This is a dramatic over simplification, an of course just the syntax, but I think it could be done. For instance, here is an example of how the m79 could be modded:

Bouncy m79:
Code: [Select]
LaunchProj
Collide_poly(bounce)
Collide_collider(explode)
Collide_player(explode)
t120: Explode


comments and suggestions?
« Last Edit: April 25, 2007, 10:30:05 am by mxyzptlk »

"While preceding your entrance with a grenade is a good tactic in
Quake, it can lead to problems if attempted at work." -- C Hacking

Offline LeetFidle

  • Camper
  • ***
  • Posts: 277
  • Poop!
Re: Weapon scripting system suggestion
« Reply #1 on: April 25, 2007, 07:13:56 am »
aha LUA scripting? i support.
Holy Poop!

Offline Zamorak

  • Camper
  • ***
  • Posts: 475
Re: Weapon scripting system suggestion
« Reply #2 on: April 25, 2007, 07:44:41 am »
It probably won't be LUA, if anything, it would be in pascal.
ZamoraK |2Wai|

Offline Lord Frunkamunch

  • Veteran
  • *****
  • Posts: 1418
  • DRR...DRR...DRR...
Re: Weapon scripting system suggestion
« Reply #3 on: April 25, 2007, 09:58:54 am »
Yes, this is a great idea and needs to be implemented. Full support!
I attend grammar school, last grade, and ignorance is all around me. Well, good for them. Ignorance is bliss.

Offline mxyzptlk

  • Veteran
  • *****
  • Posts: 1493
  • The Panda Ninja
Re: Weapon scripting system suggestion
« Reply #4 on: April 25, 2007, 10:30:47 am »
I don't know what LUA is, this is just out of my head.
I'll look LUA up.

"While preceding your entrance with a grenade is a good tactic in
Quake, it can lead to problems if attempted at work." -- C Hacking

Offline Magic Odd Effect

  • Camper
  • ***
  • Posts: 371
Re: Weapon scripting system suggestion
« Reply #5 on: April 25, 2007, 01:04:25 pm »
Ooh, I like. Nice way to adjust bullet properties.

Like, you could make the shotgun a cluster grenade launcher...

Wouldn't that be fun.

Yes.
Don't say that you're Magic. Because you aren't, and I am.
All-around good with weapons that aren't long range, except in TW.
Now be careful out there, soldier.
Best Newbie in the May 2007 Soldatforums Member Awards!

Offline mxyzptlk

  • Veteran
  • *****
  • Posts: 1493
  • The Panda Ninja
Re: Weapon scripting system suggestion
« Reply #6 on: April 25, 2007, 06:54:59 pm »
Another possibility:

Law into an RPG-7:
Code: [Select]
Launchproj
Collide(Explode)
FallSpeed=0
t1: speed 50
t15: speed 100
t30: speed 250
t60: speed 500

"While preceding your entrance with a grenade is a good tactic in
Quake, it can lead to problems if attempted at work." -- C Hacking

Offline 2big4u

  • Camper
  • ***
  • Posts: 290
  • In Game: 2big4u - Merry Christmas!
Re: Weapon scripting system suggestion
« Reply #7 on: April 25, 2007, 10:00:11 pm »
That sounds really cool, i would love to play around with bouncy m79 nades. Support the max.