The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bullet Code?
A.M Team Offline
Banned

Posts: 811
Threads: 63
Joined: Sep 2014
#1
Bullet Code?

Would you be able to get the stun rod tool to shoot out bullets that when hitting a specific object it can create a piece of code for the object and bullet (ex: Play a death animation and the bullet getting destroyed)?

Over the last week, me, Abion and Romulator have been trying to get the stun rod to shoot projectiles to the point of madness. We tried a number of systems which have been unsuccessful for the following reasons:

My way:
[Image: hvTYLeI.png]
- Can shoot enemies through walls
- Does produce effects (like bullet holes)
- We don't know if we can add areas to a HUD object yet

Abion's way:
PHP Code: (Select All)
// On gun firing
Map_GetEntity("dummy_entity").cLux_GetPlayer().GetCamera().GetPosition(); 

iLuxEntity @bullet Entity_CreateAtEntity("new_entity_name""entity_file_name""dummy_entity_name");
cVector3f forward Player_GetCamera().GetForward();
bullet.GetMainBody().SetLinearVelocity(cVector3f(forward.bulletSpeedforward.bulletSpeedforward.bulletSpeed));
Entity_AddCollideCallback("new_entity_name""monster_*""bullet_OnCollide"); 
- Too complex
- Hard to code
- Too easy to mess up code

Any suggestions on different ways on solving this issue? This post is sort of a last resort at the moment.
06-01-2016, 11:40 PM
Find


Messages In This Thread
Bullet Code? - by A.M Team - 06-01-2016, 11:40 PM
RE: Bullet Code? - by Abion47 - 06-02-2016, 05:52 AM
RE: Bullet Code? - by A.M Team - 06-02-2016, 07:56 AM
RE: Bullet Code? - by Abion47 - 06-02-2016, 08:50 AM
RE: Bullet Code? - by A.M Team - 06-02-2016, 12:16 PM



Users browsing this thread: 1 Guest(s)