Blockland Forums > Modification Help
Simple ass RPG Level system
<< < (2/3) > >>
otto-san:

--- Quote from: Obibital on July 19, 2010, 04:32:05 PM ---
Thats what u mean? :3

--- End quote ---
basically
Obibital:

--- Quote from: otto-san on July 19, 2010, 04:50:37 PM ---basically

--- End quote ---

Thanks for assisting me on multiple occasions despite my lack of tourge knowledge

Now i just gotta find a way to have the script detect the death of a bot, but im sure if that will be complicated. :p
heedicalking:

--- Quote from: Obibital on July 19, 2010, 04:56:40 PM ---Thanks for assisting me on multiple occasions despite my lack of tourge knowledge

Now i just gotta find a way to have the script detect the death of a bot, but im sure if that will be complicated. :p

--- End quote ---
It's actually quite easy. This is the code from the bot events mod by amade.

--- Code: --- function armor::onDisabled(%this, %obj)
{
parent::onDisabled(%this, %obj);
if(%obj.getClassName() $= "AIPlayer" && isObject(%brick = %obj.spawnBrick))
{
%obj.setImageTrigger(0, 0);
%obj.setImageTrigger(1, 0);
if(isObject(%obj.client))
{
%obj.client.delete();
}
$InputTarget_["Self"] = %brick;
$InputTarget_["Corpse"] = %obj;
$InputTarget_["Minigame"] = %obj.brickGroup.client.minigame;
%brick.processInputEvent("onBotDeath", %client);
if(isObject(%client = %obj.lastPusher) && (%obj.lastPushTime + 1000) > getSimTime())
{
%obj.setImageTrigger(0, 0);
%obj.setImageTrigger(1, 0);
%killer = %obj.lastPusher.player;
%minigame = %obj.minigame;
$InputTarget_["Self"] = %brick;
$InputTarget_["Killer"] = %killer;
$InputTarget_["Killer(Client)"] = %client;
$InputTarget_["Corpse"] = %obj;
$InputTarget_["Minigame"] = %minigame;
%brick.processInputEvent("onBotKilled", %client);
}
}
}
--- End code ---
Obibital:

--- Quote from: heedicalking on July 19, 2010, 05:26:14 PM ---It's actually quite easy. This is the code from the bot events mod by amade.

--- Code: --- function armor::onDisabled(%this, %obj)
{
parent::onDisabled(%this, %obj);
if(%obj.getClassName() $= "AIPlayer" && isObject(%brick = %obj.spawnBrick))
{
%obj.setImageTrigger(0, 0);
%obj.setImageTrigger(1, 0);
if(isObject(%obj.client))
{
%obj.client.delete();
}
$InputTarget_["Self"] = %brick;
$InputTarget_["Corpse"] = %obj;
$InputTarget_["Minigame"] = %obj.brickGroup.client.minigame;
%brick.processInputEvent("onBotDeath", %client);
if(isObject(%client = %obj.lastPusher) && (%obj.lastPushTime + 1000) > getSimTime())
{
%obj.setImageTrigger(0, 0);
%obj.setImageTrigger(1, 0);
%killer = %obj.lastPusher.player;
%minigame = %obj.minigame;
$InputTarget_["Self"] = %brick;
$InputTarget_["Killer"] = %killer;
$InputTarget_["Killer(Client)"] = %client;
$InputTarget_["Corpse"] = %obj;
$InputTarget_["Minigame"] = %minigame;
%brick.processInputEvent("onBotKilled", %client);
}
}
}
--- End code ---


--- End quote ---

Thanks heed, too bad i cant read a word of that.... :[

Is there a tutorial that teaches you what the use of each symbole/phrase means? i would understand this alot more knowing that, and i dont think anyone wants to bother teaching me.

(Just sayin, i have searched for Tutorials on basics vut i could never find anything very usefull)

Lawl, its in this forum XD
Wizard:
If you can't figure out which part of amade's code is required for the onBotDeath, you should learn to script before making an RPG mod.
Navigation
Message Index
Next page
Previous page

Go to full version