W.I.P Shots of my environment, there's a scripted sequence but I would have to record it.
[IMG_THUMB]https://dl.dropboxusercontent.com/u/33714868/term3/arenawip/inside.jpg[/IMG_THUMB]
[IMG_THUMB]https://dl.dropboxusercontent.com/u/33714868/term3/arenawip/outside.jpg[/IMG_THUMB]
[IMG_THUMB]https://dl.dropboxusercontent.com/u/33714868/term3/arenawip/under.jpg[/IMG_THUMB]
[QUOTE=pinecleandog;45814009]W.I.P Shots of my environment, there's a scripted sequence but I would have to record it.
[IMG_THUMB]https://dl.dropboxusercontent.com/u/33714868/term3/arenawip/inside.jpg[/IMG_THUMB]
[IMG_THUMB]https://dl.dropboxusercontent.com/u/33714868/term3/arenawip/outside.jpg[/IMG_THUMB]
[IMG_THUMB]https://dl.dropboxusercontent.com/u/33714868/term3/arenawip/under.jpg[/IMG_THUMB][/QUOTE]
I'd hire you but I am still just a developer with no €€€.
Not my project, but
Holy shit, that music game Size DOES Matter made by someone here (sorry forgot who) got promoted by one of the artists whose music was used in it (25 mins ago).
[img]http://u.rtag.me/p/lSFRMn.png[/img]
must be raking in that dolla soon
[QUOTE=Perl;45815425]Not my project, but
Holy shit, that music game Size DOES Matter made by someone here (sorry forgot who) got promoted by one of the artists whose music was used in it (25 mins ago).
[img]http://u.rtag.me/p/lSFRMn.png[/img]
must be raking in that dolla soon[/QUOTE]
hey that's my game.
[QUOTE=AtomiCal;45815440]hey that's my game.[/QUOTE]
o ye
nice job
[QUOTE=Perl;45815480]o ye
nice job[/QUOTE]
for yuor health
I have a question for you Bolt folks out there.
Is there a way I can instantiate a Bolt entity with it's owner being the server.
So any player that spawns a bomb *Bolt entity* it's owner is the server.
Yes.
You should have the player send a request to the server (as an event, I assume), and have the server spawn the entity instead of the player (if the player then needs control of the entity, then use GiveControl to have the server give the player control).
You could go even farther and just let the server spawn the bomb based on player input (using the ExecuteCommand system), although that may not be necessary for your case.
Any idea what I'm doing wrong here? I've never used Resources before.
[img]https://dl.dropboxusercontent.com/u/13781308/ShareX/2014-08/2014-08-27_12-26-22.png[/img]
Resources.Load([B] "levels/"[/B] + nextLevel );
[QUOTE=KillaMaaki;45815888]Resources.Load([B] "levels/"[/B] + nextLevel );[/QUOTE]
Forgot I removed that when trying to figure out what was wrong, the image is fixed. I was using [I][B]/[/B]levels/[/I]. I removed the slash in front and it works now
[editline]edit[/editline]
Would have helped if the documentation had an example with loading from a subfolder. Their examples tend to be pretty useless.
Fuck I hate Unity right now, some scripts that worked before now just blew of and I have to fix bugs that didn't existed before.
[QUOTE=sarge997;45815814]I have a question for you Bolt folks out there.
Is there a way I can instantiate a Bolt entity with it's owner being the server.
So any player that spawns a bomb *Bolt entity* it's owner is the server.[/QUOTE]
There are some callbacks that only get called by the server, I generally spawn stuff in those. Or just do it with a command or event that is client -> server like killa suggested.
[QUOTE=Fourier;45815946]Fuck I hate Unity right now, some scripts that worked before now just blew of and I have to fix bugs that didn't existed before.[/QUOTE]
What the hell, I need to learn my coworker basics of Transform component because this bug was not bug at all, he made his own Prefabs and looks like, he doesn't know how Transform component works.
I dont know if im being stupid or what?
I have a toggle in the GUI with these settings:
[IMG]http://i.imgur.com/dNooh4k.png[/IMG]
And the function:
[csharp]
public void AudioToggle (bool value) {
Debug.Log (value);
if(value && volume >= 0){
AudioListener.volume = volume;
}else{
volume = AudioListener.volume;
AudioListener.volume = 0;
}
AudioListener.pause = !value;
}
[/csharp]
Now I would assume the bool passed in is the new value of the toggle, but instead it seems to be the value of the check box next to the method name in the On Change Value bit... How do I get the value of the toggle?
Keep a private variable that holds the value. Then just have a method without parameters that does IsAudioOn = !IsAudioOn or whatever :P
GUI doesn't seem to work THAT well yet. I have a interactable object, when i click on it, the gui opens. All fine and dandy. But the gui doesn't block. So when i click on a button with the interactable object behind it, it opens the gui again :f
Is there a way to "consume" events? If so, try that.
I'm still trying to get Server instantiating to work on Bolt.
Here's my PlayerBombPlacer script.
[code]using UnityEngine;
using System.Collections;
public class PlayerBombPlacer : BoltEntityBehaviour
{
void Update ()
{
if (boltEntity.hasControl && Input.GetKeyDown(KeyCode.Mouse0) && !Disconnect.escapeMenuOpen)
{
IPlaceBomb evnt = BoltFactory.NewEvent<IPlaceBomb>();
BoltNetwork.Raise(evnt);
}
}
}[/code]
Here's my ServerCallbacks script which recieves the Raise event.
[code]using UnityEngine;
using System.Collections;
public class ServerCallBacks : BoltCallbacks
{
BoltEntity player;
public override void MapLoadDone (string arg)
{
player = BoltNetwork.Instantiate(BoltPrefabs.PlayerPiggy);
player.transform.position = new Vector3 (0, 1, 0);
(player.boltSerializer as PlayerSerializer).boltState.name = PlayerNameField.playerName;
}
public override void OnEvent (IPlaceBomb evnt, BoltConnection cn)
{
GameObject bombSpawnPosition = player.transform.FindChild ("BombSpawnPosition").gameObject;
Camera cam = player.GetComponentInChildren<Camera>();
BoltEntity obj = BoltNetwork.Instantiate(BoltPrefabs.Bomb);
evnt.position = new Vector3(bombSpawnPosition.transform.position.x, bombSpawnPosition.transform.position.y, bombSpawnPosition.transform.position.z);
obj.transform.position = evnt.position;
obj.transform.eulerAngles = new Vector3 (cam.transform.eulerAngles.x, cam.transform.eulerAngles.y, cam.transform.eulerAngles.z);
}
}
[/code]
So those two together, SEEM to work okay. Combined with these settings on the Bolt Event for placing a bomb.
[IMG]http://i.imgur.com/rDCEXJL.png[/IMG]
But I don't quite get how this is is instantiating as an object owned by the server.
As when the destroy "Bomb" script comes in it only destroys them on the server, and not the client that placed the object.
[code]using UnityEngine;
using System.Collections;
public class Bomb : BoltEntitySerializer<IBombState>
{
public GameObject explosion;
public float explosionTime;
void Start ()
{
Invoke ("Explosion", explosionTime);
}
void Explosion ()
{
GameObject boom = Instantiate (explosion, transform.position, Quaternion.identity) as GameObject;
Destroy (boom, 5);
if (BoltNetwork.isServer)
{
BoltNetwork.Destroy (gameObject);
}
}
}[/code]
Now I don't understand why this destroy script wouldn't work, as I'm instantiating the bombs from the server, aren't I?
I've spent all day trying to figure this out, and I've looked at all the references, tutorials. Asked for help from a few people which has helped, but I still suffer from this problem.
I normally don't ask for help on my problems. But I'm out of solutions. Please someone help.
[QUOTE=Arxae;45817804]Keep a private variable that holds the value. Then just have a method without parameters that does IsAudioOn = !IsAudioOn or whatever :P
GUI doesn't seem to work THAT well yet. I have a interactable object, when i click on it, the gui opens. All fine and dandy. But the gui doesn't block. So when i click on a button with the interactable object behind it, it opens the gui again :f[/QUOTE]
That works for the toggle, but I also have sliders :(
I don't see the problem? You can keep your entire script, just have a class variable that holds the value for AudioListener.pause
No I mean I have a different script that is attached to a slider, and I cant get access to the value of the slider
[QUOTE=sarge997;45817984]stuff[/QUOTE]
You have to think of it as each client has a separate object as does the server, they are just syncing the data you set between them. You will need to send a destroy event or command to the clients.
[editline]28th August 2014[/editline]
Actually, an easier way.
Put a boolean property in the state and check for it in Update on clients, call destroy if true.
[QUOTE=reevezy67;45818394]@sarge
You have to think of it as each client has a separate object as does the server, they are just syncing the data you set between them. You will need to send a destroy event or command to the clients.
[editline]28th August 2014[/editline]
Actually, an easier way.
Put a boolean property in the state and check for it in Update on clients, call destroy if true.[/QUOTE]
BoltNetwork.Destroy [I]should[/I] automatically send destroy event to clients. If it doesn't, something is probably wrong.
(also, syncing a boolean flag for whether the object should be destroyed I'd say is definitely the wrong/sloppy way to do it)
Are there any errors logged when the bomb is destroyed, either on clients or on the server?
Oh is it? Strange.
Either way, it only sends the boolean when it changes so there's no harm, it's not THAT sloppy.
[QUOTE=Richy19;45818172]No I mean I have a different script that is attached to a slider, and I cant get access to the value of the slider[/QUOTE]
Ah i see, little more info on the problem?
I just started with Unity and made a drawer you can open and close
[vid]http://chessnut.info/storage/2014-08-27_14-16-06.webm[/vid]
[QUOTE=reevezy67;45818500]Oh is it? Strange.
Either way, it only sends the boolean when it changes so there's no harm, it's not THAT sloppy.[/QUOTE]
You should really only use them for actual properties of an object like position, rotation, etc. It's better to represent things that can happen to an object with events rather than serialized flags.
[QUOTE=KillaMaaki;45818534]You should really only use them for actual properties of an object like position, rotation, etc. It's better to represent things that can happen to an object with events rather than serialized flags.[/QUOTE]
It's very much personal preference and whether you want to define it as a state or an event. (IsDestroyed vs Destroy)
Plus defining things as state requires less code and I'm in the get shit done category.
In this case if Destroy() is already implemented he might as well try to use that.
[QUOTE=KillaMaaki;45818442]BoltNetwork.Destroy [I]should[/I] automatically send destroy event to clients. If it doesn't, something is probably wrong.
(also, syncing a boolean flag for whether the object should be destroyed I'd say is definitely the wrong/sloppy way to do it)
Are there any errors logged when the bomb is destroyed, either on clients or on the server?[/QUOTE]
These are the 3 errors I get.
[code] entity is not attached
UnityEngine.Debug:LogError(Object)
BoltLog:<.cctor>b__3(String) (at c:/Users/Fredrik/Documents/GitHub/bolt/src/bolt/bolt/BoltLog.cs:45)
BoltLog:Error(String) (at c:/Users/Fredrik/Documents/GitHub/bolt/src/bolt/bolt/BoltLog.cs:156)
BoltEntity:Detach() (at c:/Users/Fredrik/Documents/GitHub/bolt/src/bolt/bolt/entity/BoltEntity.cs:681)
BoltCore:Destroy(BoltEntity) (at c:/Users/Fredrik/Documents/GitHub/bolt/src/bolt/bolt/BoltCore.cs:197)
BoltEntityChannel:DestroyIncommingProxy(BoltEntityProxy) (at c:/Users/Fredrik/Documents/GitHub/bolt/src/bolt/bolt/entity/BoltEntityChannel.cs:524)
BoltEntityChannel:ReadUpdate(BoltPacket) (at c:/Users/Fredrik/Documents/GitHub/bolt/src/bolt/bolt/entity/BoltEntityChannel.cs:433)
BoltEntityChannel:Read(BoltPacket) (at c:/Users/Fredrik/Documents/GitHub/bolt/src/bolt/bolt/entity/BoltEntityChannel.cs:253)
BoltConnection:PacketReceived(BoltPacket) (at c:/Users/Fredrik/Documents/GitHub/bolt/src/bolt/bolt/BoltConnection.cs:395)
BoltCore:PollNetwork() (at c:/Users/Fredrik/Documents/GitHub/bolt/src/bolt/bolt/BoltCore.cs:408)
BoltCore:FixedUpdate() (at c:/Users/Fredrik/Documents/GitHub/bolt/src/bolt/bolt/BoltCore.cs:532)
BoltPoll:FixedUpdate() (at c:/Users/Fredrik/Documents/GitHub/bolt/src/bolt/bolt/BoltPoll.cs:10)
[/code]
[code] MissingReferenceException: The object of type 'BoltEntity' has been destroyed but you are still trying to access it.
Your script should either check if it is null or you should not destroy the object.
UnityEngine.Component.get_gameObject () (at C:/BuildAgent/work/d63dfc6385190b60/artifacts/EditorGenerated/UnityEngineComponent.cs:173)
BoltCore.Destroy (.BoltEntity entity) (at c:/Users/Fredrik/Documents/GitHub/bolt/src/bolt/bolt/BoltCore.cs:198)
BoltEntityChannel.DestroyIncommingProxy (.BoltEntityProxy proxy) (at c:/Users/Fredrik/Documents/GitHub/bolt/src/bolt/bolt/entity/BoltEntityChannel.cs:524)
BoltEntityChannel.ReadUpdate (.BoltPacket packet) (at c:/Users/Fredrik/Documents/GitHub/bolt/src/bolt/bolt/entity/BoltEntityChannel.cs:433)
BoltEntityChannel.Read (.BoltPacket packet) (at c:/Users/Fredrik/Documents/GitHub/bolt/src/bolt/bolt/entity/BoltEntityChannel.cs:253)
BoltConnection.PacketReceived (.BoltPacket packet) (at c:/Users/Fredrik/Documents/GitHub/bolt/src/bolt/bolt/BoltConnection.cs:395)
UnityEngine.Debug:LogException(Exception)
BoltLog:<.cctor>b__4(Exception) (at c:/Users/Fredrik/Documents/GitHub/bolt/src/bolt/bolt/BoltLog.cs:54)
BoltLog:Exception(Exception) (at c:/Users/Fredrik/Documents/GitHub/bolt/src/bolt/bolt/BoltLog.cs:185)
BoltConnection:PacketReceived(BoltPacket) (at c:/Users/Fredrik/Documents/GitHub/bolt/src/bolt/bolt/BoltConnection.cs:404)
BoltCore:PollNetwork() (at c:/Users/Fredrik/Documents/GitHub/bolt/src/bolt/bolt/BoltCore.cs:408)
BoltCore:FixedUpdate() (at c:/Users/Fredrik/Documents/GitHub/bolt/src/bolt/bolt/BoltCore.cs:532)
BoltPoll:FixedUpdate() (at c:/Users/Fredrik/Documents/GitHub/bolt/src/bolt/bolt/BoltPoll.cs:10)
[/code]
[code] exception thrown while unpacking data from 127.0.0.1:27015, disconnecting
UnityEngine.Debug:LogError(Object)
BoltLog:<.cctor>b__3(String) (at c:/Users/Fredrik/Documents/GitHub/bolt/src/bolt/bolt/BoltLog.cs:45)
BoltLog:Error(String) (at c:/Users/Fredrik/Documents/GitHub/bolt/src/bolt/bolt/BoltLog.cs:156)
BoltLog:Error(String, Object) (at c:/Users/Fredrik/Documents/GitHub/bolt/src/bolt/bolt/BoltLog.cs:165)
BoltConnection:PacketReceived(BoltPacket) (at c:/Users/Fredrik/Documents/GitHub/bolt/src/bolt/bolt/BoltConnection.cs:405)
BoltCore:PollNetwork() (at c:/Users/Fredrik/Documents/GitHub/bolt/src/bolt/bolt/BoltCore.cs:408)
BoltCore:FixedUpdate() (at c:/Users/Fredrik/Documents/GitHub/bolt/src/bolt/bolt/BoltCore.cs:532)
BoltPoll:FixedUpdate() (at c:/Users/Fredrik/Documents/GitHub/bolt/src/bolt/bolt/BoltPoll.cs:10)
[/code]
Which machines trigger these events? (client / server)?
Sorry, you need to Log In to post a reply to this thread.