Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Server Development
Habbo Retros
Habbo Recruitment
Developer C#
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="BR4DLEY" data-source="post: 382624" data-attributes="member: 10966"><p>Me.</p><p>Here's some code from a game of mine.. which is in c#</p><p>[CODE]public void Spawn()</p><p> {</p><p> spawned = true;</p><p> Transform spawn = spawns[Random.Range(0, spawns.Length)];</p><p> GameObject pl = PhotonNetwork.Instantiate(PlayerPrefs.GetString("class"), spawn.position, spawn.rotation, 0) as GameObject;</p><p> if (pl != null)</p><p> {</p><p> characterControls cc = pl.GetComponent<characterControls>();</p><p> cc.enabled = true;</p><p> cc.fpsCam.SetActive(true);</p><p> cc.head.gameObject.SetActive(false);</p><p> cc.mesh.shadowCastingMode = UnityEngine.Rendering.ShadowCastingMode.ShadowsOnly;</p><p> foreach(MeshRenderer accessory in cc.accessories)</p><p> {</p><p> accessory.shadowCastingMode = UnityEngine.Rendering.ShadowCastingMode.ShadowsOnly;</p><p> }</p><p> cc.pv.RPC("setName", PhotonTargets.AllBuffered, PhotonNetwork.playerName);</p><p> cc.pv.RPC("setPFP", PhotonTargets.AllBuffered, profilePicURL);</p><p> }</p><p> }</p><p> GameObject botToSpawn;</p><p> public void spawnBot(string nm)</p><p> {</p><p> if (GameObject.Find("_Network").GetComponent<PhotonView>().isMine)</p><p> { </p><p> foreach(GameObject bt in botAi)</p><p> {</p><p> if(bt.name == nm)</p><p> {</p><p> botToSpawn = bt;</p><p> }</p><p> }[/CODE]</p></blockquote><p></p>
[QUOTE="BR4DLEY, post: 382624, member: 10966"] Me. Here's some code from a game of mine.. which is in c# [CODE]public void Spawn() { spawned = true; Transform spawn = spawns[Random.Range(0, spawns.Length)]; GameObject pl = PhotonNetwork.Instantiate(PlayerPrefs.GetString("class"), spawn.position, spawn.rotation, 0) as GameObject; if (pl != null) { characterControls cc = pl.GetComponent<characterControls>(); cc.enabled = true; cc.fpsCam.SetActive(true); cc.head.gameObject.SetActive(false); cc.mesh.shadowCastingMode = UnityEngine.Rendering.ShadowCastingMode.ShadowsOnly; foreach(MeshRenderer accessory in cc.accessories) { accessory.shadowCastingMode = UnityEngine.Rendering.ShadowCastingMode.ShadowsOnly; } cc.pv.RPC("setName", PhotonTargets.AllBuffered, PhotonNetwork.playerName); cc.pv.RPC("setPFP", PhotonTargets.AllBuffered, profilePicURL); } } GameObject botToSpawn; public void spawnBot(string nm) { if (GameObject.Find("_Network").GetComponent<PhotonView>().isMine) { foreach(GameObject bt in botAi) { if(bt.name == nm) { botToSpawn = bt; } }[/CODE] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Recruitment
Developer C#
Top