Author Topic: Admin Camera  (Read 1575 times)

I've never really edited an existing datablock before. Would I just go about doing:
Code: [Select]
cameraImage.stateEmitter1.setEmitter(burnEmitterA);I'm 99% sure thats wrong. How would you edit this?

I've never really edited an existing datablock before. Would I just go about doing:
Code: [Select]
cameraImage.stateEmitter1.setEmitter(burnEmitterA);I'm 99% sure thats wrong. How would you edit this?
Well, I think you can do it by just making cameraImage.stateEmitter1 = datablockemitter;

Now is that possible to do through the console? Or should I do it beforehand in a script?

You can do that in the console:
Code: [Select]
CameraImage.stateEmitter1 = burnEmitterA;
I dont know if that will work, but it might.

You can do that in the console:
Code: [Select]
CameraImage.stateEmitter1 = burnEmitterA;
I dont know if that will work, but it might.
Nope, that didn't change anything.

What milk is telling you is going to cause one of two things to happen
1. The server has dropped the connection: Invalid packet
2. For everyone but the host, nothing.
The way I posted is about the same way that I made the pain emitters for gore mod, and it doesn't break things and works for everyone on the server.

So, I need to create a new image? Like:
Code: [Select]
datablock shapeBaseImageData(fireCamImage : cameraImage)
{
fireCamImage.stateEmitter1 = burnEmitterA;
}
package CameraOverwrite
{
   function dropCameraAtPlayer(%this,%args,%args,%args)
   {
      parent::dropCameraAtPlayer(%this,%args,%args,%args);
      %this.camera.unMountImage(0);
      %this.camera.mountImage(fireCamImage,0);
   }
};
activatePackage(CameraOverwrite);
In a basic sense with the correct arguments?

Just throw cameraImage.stateEmitter[1] = burnEmitterA; into a server.cs and it should work OK, provided stateEmitter[1] is the correct index - I didn't check. Typing it directly into the console won't work because states are kept cached permanently upon execution and changes to them won't properly take effect until you reload the mission, so modifying it as the mission starts (and before you've connected) should be fine.
« Last Edit: June 12, 2009, 05:48:48 AM by Ephialtes »

Tom

Why don't you just override the particle datablock?

There's no point when you can use what I suggested above. That way you can keep the camera glow emitter for use on bricks.

I put
Code: [Select]
cameraImage.stateEmitter[1] = burnEmitterA; into a server.cs with a description.txt and packaged it as Script_fireCamera. I enabled in add-ons, hosted it online, but it didn't seem to change anything. Is there something wrong with what I did or would it just be the wrong index?

I put
Code: [Select]
cameraImage.stateEmitter[1] = burnEmitterA; into a server.cs with a description.txt and packaged it as Script_fireCamera. I enabled in add-ons, hosted it online, but it didn't seem to change anything. Is there something wrong with what I did or would it just be the wrong index?
How are you checking if it's working?

Nano changed it to leave a trial of blue dust. It looked awsome.

Ontopic: Can't help, sorry :<

How are you checking if it's working?
I asked other players to see if it was fire.