Forums Index >> Modding >> Ummm, some scripting help (haven't done this ...
Page : <1> :
Can u do
function ( Insert You son of a biatch) DATABLOCK::onEnter(%db,%this,%tank){ $DATABLOCK = %this;Etc. Etc. Etc.} ( now work dammit) end function?
Sorry guys its my nature to joke,,any how ,, how about giving Art Crazy a shout. If you cant reach him I usually see him on msn.
Or, here is the whole thing for "onenter"
First create a function
Function functioname
::onenter(%db, %this, %tank)
{
%tank.incScore(3,3);
centerprintall(%tank.client.namebase SPC "Insert Text here!",5,2);
}
Now create the actuall powerup! Make sure the datablck name is the same as the function name
Datablock powerupdata(DataBlock Name
)
{
category = "PowerUp";
shape = "game/data/shapes/FOLDER NAME
/file name
";
type = "bounce";
shadow = true;
shadowAnimation = true;
startOn = true;
minOff = 120000; //How long it takes to come back once you've picked it up
maxOff = 120000; //Same thing
Sound = "PupOnSound";
soundOff = "PupOffSound";
};
Only lethal on days that end with "Y"
@ CB LMAO - been trying that technique wish it worked................... :[
@ Sersh, thanks but the standard onenter function is not the issue
As CS said "We are looking for a way to edit a function, outside it's onEnter function."
In simple terms what we are trying to do is use an onenter function for one datablock say Function GataA::onenter(%db, %this, %tank) to set a different datablock say Datablock powerupdata(GoalB) in a different position, this GoalB datablock has its own onenter function. I other words get GoalB to appear in a different location from GataA when the gate is entered.
Any ideas?
Daz
Page : <1> :
Okay, well.. I need a way to edit a function, outside it's onEnter.. Like this
function DATABLOCK::onEnter(%db,%this,%tank)
{
$DATABLOCK = %this;
Etc. Etc. Etc.
}
So, I could do something like
$DATABLOCK.setDatablock(DATABLOCK);
In another onEnter function.
The above idea didnt work, but I would like some other suggestions! :) thx