Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - emachala

Pages: [1]
1
Other Packages / SGSK - Missile question
« on: October 02, 2014, 10:29:57 AM »
Looking for best place to limit Missile launch, Im going to pass a bool from another script. To allow me to wait for missile bay doors to open before firing. In fact i plan to have all secondary attacks/abilities be checked against a var.

That being said would this be the best place to check if my bay doors are open(set to true or false)?

was testing earlier with missile.cs script but now i think this is a better place to check bool.

  1.                                         // Fire the secondary weapon and check for secondary bay is open
  2.                                         if (mSecondary.Count > 0 && (Input.GetMouseButton(1) || Input.GetKey(KeyCode.JoystickButton5)))
  3.                                         {
  4.                                                 if (mNextSecondary < Time.time)
  5.                                                 {
  6.                                                         mNextSecondary = Fire(mSecondary);
  7.                                                 }
  8.                                         }

Side note haven't torn thru missiles yet, i know there is a energy depletion on fire? is there a missile count variable in place already? I could re-task from unlimited or must i add one?

2
TNet 3 Support / Re: SGSK - Tnet animation question
« on: October 01, 2014, 09:14:45 PM »
ah yes noobish mistake didnt realize a tn object was needed again on Hull inside Starship.prefab.

Thanks  i edited script in mono and didnt add it drop menu so didn add the tnobject auto.

Works perfect

3
TNet 3 Support / SGSK - Tnet animation question
« on: September 30, 2014, 03:09:47 PM »
Added my new ships via selectors via main menu. wanted to setup first animation working over tnet, since i tested them via my old JS. cant seem to get them working over tnet yet  what my issue? tried it a number of ways.. Going to pull apart my ui kit i got yesterday for tnet and ngui maybe add some more insight for me.


js play single animation on key press
  1. var PowerOn : AnimationClip;
  2.  
  3. function Start() {
  4.  
  5. }
  6.  
  7. function Update() {
  8.    if( Input.GetKeyDown(KeyCode.k) ) {
  9.       animation.Play("LandingGearsDown01");
  10.       audio.Play();
  11.    }
  12. }

C# play single animation on key press over tnet
  1. using UnityEngine;
  2. using TNet;
  3.  
  4. public class ShipAnimations : TNBehaviour
  5. {
  6.         // Use this for initialization
  7.         void Start () {
  8.         }
  9.        
  10.         // Update is called once per frame
  11.         void Update () {
  12.           if (tno.isMine)
  13.         {      
  14.           if (Input.GetKeyDown(KeyCode.K))
  15.           tno.Send("Play", Target.All);  
  16.         }  
  17.     }
  18.   [RFC] void Play() {
  19.      animation.Play("LandingGearsDown01");
  20.     }
  21.  
  22. }
  23.  
  24.  

4
Other Packages / Re: SGSK - ngui and NetworkInstantiate
« on: September 30, 2014, 02:58:39 PM »
perfect thanks

5
Other Packages / SGSK - ngui and NetworkInstantiate
« on: September 28, 2014, 01:24:38 PM »
Im looking for the best way to have a drop down using Ngui, new to me, to select 1 of 4 ships and then when you join or host, you connect in your chosen ship.

sure i need to add all 4 ships to the tn manager.

But, How do i get the ngui select drop down to tell NetworkInstantiate which prefab to use on player join?

-e


Pages: [1]