News: Enjoy our Christmas offer 30% off on our latest package Tower Defense Level Kit

  • March 26, 2019, 11:16:16 PM

Login with username, password and session length

Author Topic: Integrating into existing control system  (Read 914 times)

Offline jmschrack

  • Newbie
  • *
  • Posts: 1
Integrating into existing control system
« on: July 25, 2016, 05:57:25 PM »
I'm looking to integrate the Weapon system into our existing user input and control system.  I've been going over the source code, and it looks like I can just call "Shoot()" and "StopShoot()" and use a boolean to avoid spamming the Shoot() method.

For example
Code: [Select]
Weapon w;

}else if(trigger<triggerThreshold){

Is this the way it should be done or is there a better/ more preferred way to accomplish this?

Offline Nicolas

  • Administrator
  • Hero Member
  • *****
  • Posts: 792
Re: Integrating into existing control system
« Reply #1 on: July 25, 2016, 10:53:29 PM »

That's exactly right, you just have to call Shoot & StopShoot. (The API documentation is expected to arrive with the Beta 2 late August )

If you want to make one shoot, instead of putting a boolean, simply activate the one shot mode on the weapon