Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Space Guy

Pages: 1 ... 174 175 176 177 178 [179] 180 181 182 183 184 ... 410
2671
Modification Help / Re: re-load inventory menu
« on: August 06, 2009, 02:29:53 PM »
You may not need the ::changeDatablock one with that either. Untested, though.

2672
Modification Help / Re: re-load inventory menu
« on: August 06, 2009, 02:28:04 PM »
Try adding this bit to the package.
Code: [Select]
	function Armor::onNewDatablock(%this,%data)
{
Parent::onNewDatablock(%this,%data);
if(isObject(%this.client))
commandToClient(%this.client,'PlayGui_CreateToolHud',%data.maxTools);
}

2673
Modification Help / Re: Created Brick Trust Problems
« on: August 06, 2009, 02:23:43 PM »
Add the brick to the client's brickgroup.

2674
Modification Help / Re: Bullets wont fire straight ahead
« on: August 06, 2009, 02:23:01 PM »
Change this
Code: [Select]
%x = (getRandom() - 1.0) * 20 * 5 * %spread;
to either
Code: [Select]
%x = (getRandom() - 2.0) * 20 * 5 * %spread;
for a random pattern, or
Code: [Select]
%x = (%i - 4) * 25 * %spread;
for a predictable horizontal spread.

2675
Modification Help / Re: Chase Cam?
« on: August 06, 2009, 11:59:32 AM »
Oh. The function description said "boolean [fadein]" so I assumed that "true" was to fade back in i.e. remove the black.

2676
Modification Help / Re: Chase Cam?
« on: August 06, 2009, 11:29:16 AM »
That never worked for me...

2677
Suggestions & Requests / Re: KillCam
« on: August 06, 2009, 11:26:41 AM »
GameConnection::onDeath allows you to find the killer. See Team Deathmatch for that and camera adjustments.

You could try client-timescale too for "slowed down" camera, but that might be glitchy.

2678
Suggestions & Requests / Re: Request to save bricks
« on: August 06, 2009, 08:44:02 AM »
In order to see the build, information about each brick, its colour and position must be transferred to other people. This information can be saved.

In order to stop this transfer, don't host a public server.

2679
Modification Help / Re: Blockmin
« on: August 06, 2009, 08:42:47 AM »
War between players?

2680
Suggestions & Requests / Re: The AS-KR1.
« on: August 06, 2009, 07:35:21 AM »
Look at the Flak Cannon, it's pretty much exactly the same function. Then give Ephialtes credit for the source.

2681
Creativity / Re: The new and improved 3D model topic!
« on: August 06, 2009, 06:33:45 AM »
The Sentry Gun now looks awesome.

2682
General Discussion / Re: Invalid Packet??
« on: August 06, 2009, 05:53:40 AM »
Console log. Does it work if you use other maps or disable all Add-Ons?

2683
You don't need to PM me and post in the topic.

2684
Look at other mods that set RTB preferences, for instance the Duplicator. Then, instead of maxTools = 8; or uiName = "8-Slot Player"; you could have maxTools = $MultiSlotPlayer::Slots; and uiName = $MultiSlotPlayer::Slots @ "-Slot Player";.

Pref Manager
RTB will be including a preference manager which will be accessible to Super Admins on the server. Any add-on can register prefs to be managed by this using the following function:

RTB_registerPref("Pref Name","Category","Pref","Var Type","Your Mod Name","Default Pref Value","Requires Server Restart","Host Only");

Pref Name - The display name of your Pref.
Category - This will usually be the name of your Add-on.
Pref - The actual variable name without the $.
Var Type - The field type, much like the events system it supports list, string (max length), bool and int (minval) (maxval).
Your Mod Name - The name of your mod, simply for error reporting.
Default Pref Value - Enter a default value for the pref if it has not been changed or set before.
Requires Server Restart - Puts a * in the gui to show that changing it will require a server restart.
Host Only - This will prevent non-hosts from changing that setting.

Here is an example:
Code: [Select]
if(isFile("Add-Ons/System_ReturnToBlockland/server.cs"))
{
   if(!$RTB::RTBR_ServerControl_Hook)
      exec("Add-Ons/System_ReturnToBlockland/RTBR_ServerControl_Hook.cs");
   RTB_registerPref("Duplicator Timeout","Duplicator","Duplicator::Timeout","int 0 60","Tool_Duplicator",40,0,0);
}
else
{
   $Duplicator::Timeout = 40;
}
This would register a pref called "Duplicator Timeout" in the Duplicator category which would change the $Duplicator::Timeout pref. The user would be allowed to enter an integer between 0 and 60 inclusive. The pref is registered by the Tool_Duplicator add-on. The default timeout is 40 seconds. It does not require a restart to begin working and both the host AND super admins can change it. If RTB is not installed, it will set the $Duplicator::Timeout value to 40 anyway so the add-on still works.

This code should be placed in the server.cs of your Add-On

2685
Help / Re: Blockland Crosshair Gone!
« on: August 06, 2009, 04:49:47 AM »
Console log.

Pages: 1 ... 174 175 176 177 178 [179] 180 181 182 183 184 ... 410