Quantcast
Channel: Questions in topic: "javascipt"
Viewing all articles
Browse latest Browse all 1875

How to make speed changed in js

$
0
0
i know, this is very simple. First off, this is not going to be attached to my Enemy but i want to know if its possible to change the navmeshspeed from a script to my enemy. It is named "OGRE". I need this script converted into Javascript, and i need it to somehow do it remotely without attach the script to the enemy. Need this converted and remotely change speed: GetComponent().speed = 6f; Yes, I don't know if its possible. Yes my "Enemy" is named "OGRE". it would be very awesome if you could respond fast. Thanks!
Full script: #pragma strict var coinValue = 1; function OnTriggerEnter(info: Collider) { if (info.name == "Player") { GameMaster.currentScore += coinValue; Destroy(gameObject); GetComponent().speed = 6f; // <---- Need this converted remotely! } }

Viewing all articles
Browse latest Browse all 1875

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>