You are not logged in.    Login    New User    Forum Home    Search

Location:
JBPLAY  \  Meteor 2  \  Suggestions  \  Weapon and projectile coding

Back to Threads

Viewing Thread: Weapon and projectile coding

 

40oz
 Official Sponsor

Joined: 03 January 2004
Posts: 1799
10 May 2005 18:24 (UK time)

The ability to code what your projectiles and weapons do other than the commands you pick from the editors, like delay before firing time, fire 50 projectiles before [a certain time] will cause a 10 second pause. (Those specific things would be good for a minigun)

Projectiles stick to enemy object, weapon firing speed increases 1 for every second firing (These specific things would be good for a Halo 2 needler)

I would like to see peoples weapon creations
*Papercut
Pro-Murder.
Legalize Crime.


You need to login to create posts in this thread.

JT
Joined: 15 May 2005
Posts: 1
16 May 2005 00:11 (UK time)

I would love more direct control over the weapons of enemies and players. In particular:


Event Triggers:

void OnObjectShoot_???(int weapon_ID, int bearing);
-- Triggered whenever object ID #??? performs an attack. Weapon ID and bearing are populated appropriately based on the direction that the object fired in.

void OnPlayerShoot(int weapon_ID, int bearing);
-- Triggered whenever the player performs an attack. Weapon ID and bearing are populated as above.

void OnObjectShoot(int weapon_ID, int bearing, int object_ID);
-- A general form of OnObjectShoot_???() which doesn't care about which object does the shooting. Object ID is populated with the firing object's ID.


Script Commands:

void SC_LaunchProjectileFromCoords(int x, int y, int bearing, int proj_ID);
-- Fires a projectile directly from the coordinates. No objects need to exist there -- this simply spawns and launches the projectile out of thin air.

void SC_LaunchProjectileFromObject(int object_ID, int bearing, int proj_ID);
-- Forces the specified object to fire a projectile from its current coordinates at the specified direction. The object does not have to be facing the direction. Note that this does not call the OnXXXShoot() triggers.


These five instructions alone would allow for burst-fire weapons and shotguns. Whenever an object shoots -- OnObjectShoot() or OnPlayerShoot() -- the enterprising developer could track the weapon ID and compare it against some expected values; if the value is a shotgun, then five or six more of the same projectiles could be fired from the object with the LaunchProjectileFromObject() or LaunchProjectileFromPlayer() functions.

There would, however, be one shortcoming: scripts such as these would be tied to the maps, not to the objects. New functionality would be needed to link the scripts to the weapons, or perhaps a new "global script" feature would need to be added which allows itself to affect every map played with that mod...


Here's another few that would be nice:

void SC_RotateObjectToFaceTarget(int object_ID, int target_ID);
-- Temporarily requests for the specified object ID to turn until it is directly facing the specified target object ID (within a small threshold, to prevent quirks). This supersedes whatever other turning the object wants to do, at least until the rotation is complete.

void SC_RotateObjectToFaceCoords(int object_ID, int x, int_y);
void SC_RotateObjectToFacePlayer();
-- Should be self-explanatory.

Edited: 16 May 2005 00:16


You need to login to create posts in this thread.

Assain

Joined: 02 November 2003
Posts: 979
16 May 2005 20:47 (UK time)

Very nice. I would like to see all of those for M2, and possibly also a "scripting" function for the weapons editor, so it would be possible to create "advanced" weapons. Like, on weapon fire, it would run whatever script is placed in the script diolouge in the weapons editor.

You need to login to create posts in this thread.

mike323
Joined: 23 January 2005
Posts: 745
17 May 2005 20:13 (UK time)

Great ideas, I think those commands would make M2 much more flexible.

You need to login to create posts in this thread.



Forums system (C) 1999-2023 by James Bunting.

Terms of Use