Author Topic: In-Game Script Editor - Beta 3b Important Fix!  (Read 3081 times)

Useful, but I think I'm going to modify it heavily to suit my own needs.

Useful, but I think I'm going to modify it heavily to suit my own needs.
Clearly we need an In-Game Script Editor Editor, for this purpose.

Anyway, this could use a "Refresh Datablocks" button. I believe there's a script (if it still works in v9/10) that lets you send updated datablocks to clients in the server, for anything except new models being added.

Transmit datablocks shouldn't be used after a player has loaded, and new datablocks shouldn't be introduced after the player has loaded because it does affect the stability of the server.

Tom

The brick editor in v8 would cause everyone in the server to crash when someone made a new brick.

And jet, I need a detailed description of what you've been doing and when it started happing.

Ok, Ive been trying to port the brick messages.

I edit the script abit and execute it as so:
Code: [Select]
datablock ItemData(MessageItem) //Something's fuxxed in the script
{
category = "Item";  // Mission editor category

equipment = True;

//its already a member of item namespace so dont break it
className = "Item"; // For inventory system

// Basic Item Properties
shapeFile = "/base/data/shapes/empty.dts";
mass = 1;
density = 0.2;
elasticity = 0.2;
friction = 0.6;
emap = true;

//gui stuff
uiName = "Brick Message";
iconName = "./ItemIcons/Parachute";
doColorShift = true;
colorShiftColor = "0.200 0.200 0.200 1.000";

// Dynamic properties defined by the scripts
image = ParaImage;
canDrop = true;
};

function MessageItem::onPickup(%this, %item, %obj, %amount)
{
if(%item.spawnBrick.client.bl_id == %obj.client.bl_id)
{
if(%item.hasamessage){messageClient(%obj.client,"","\c2This brick has a message - respawn the item to set a new one.");return;}
%obj.client.messageSet = 1;
%obj.client.messageitem = %item;
%item.hasamessage = 1;
messageClient(%obj.client,"","\c2Type in chat what you want this brick to say.");
}
else
{
messageClient(%obj.client,"","\c2This is not your brick! Ask" SPC %item.spawnBrick.client.name SPC "to set messages if you want.");
}
}

package MessageSetter {
function serverCmdMessageSent(%client, %text){
if(%client.messageSet){
%client.messageitem.setShapeName(%text);
%client.messageSet = 0;
messageClient(%client,"","\c2Brick message set to \"" @ %text @ "\".");
} else {
Parent::serverCmdMessageSent(%client, %text);
}
}
};
ActivatePackage(MessageSetter);

Then again, I might just be going ahead of myself tyring to edit this.

Tom

I know whats happening, I just don't know what caused it. I added a error GUI so that when it happens it backs up a displays the GUI.

It might be hapening with only this one script. Ill try editing something else

Oh, wow...

This is very useless.

Really if you want to script ingame you can just open up notepad...
It's very useful in RPG mod where you might have to change some preferences or some stuff...

I figured it out. If you try to execute, something thats already enabled I get the error.

Hao 2 fix?

Tom

Thanks. I'll take a look.

Just so you know - It overrides the backup file if it has to back up twice.

I don't think thats it, I could exec files many times. Do you have b3?
« Last Edit: November 29, 2008, 04:00:53 PM by Tom »

Ive gota get B3, and test it. Ill reply, when its done

It's very useful in RPG mod where you might have to change some preferences or some stuff...
If you didn't know you can already modfiy scripts via notepad and console.

This just made it abit easier.

it looks kewl i just DLed it ill try it out i hope i can edit a map!

This could get handy. The script should be color coded, though. Makes life easier.

Tom

Use it at your own risk, it does have some saving/execing bugs.