Forums Index >> Modding >> Ummm, some scripting help (haven't done this ...



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

Monday, April 10, 2006 at 1:22:02 PM

Any help with this function would be appreciated as its the final part to a project that has taken some 4 months so far to complete.

Suggestions?

Thanks

Daz

 

 

 

 

Wednesday, April 12, 2006 at 3:04:24 AM

I d like to help, and in fact I can type here. But I m sure you guys don't need my help on this because I can't script. And would probably ruin it...

Scythe

Wednesday, April 12, 2006 at 4:02:12 PM

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.

 

 

Wednesday, April 12, 2006 at 6:46:02 PM

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"

Wednesday, April 12, 2006 at 9:10:21 PM

@ 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

 

 

 

 

 

Thursday, April 13, 2006 at 4:28:09 AM

Sersh.... Please, I asked help from scriptors... Not... Um... You. If you could script, and I couldnt, Im sure that might be remotely helpful if I had a mental illness.

Thursday, April 13, 2006 at 3:49:12 PM

Page : <1> :

insert quote insert url insert email insert image bold italic underline superscript subscript horizontal rule : : Help on using forum codes

Add comment:

HTML is disabled within comments, but ZBB Code is enabled.

Back to the top

Web site designed, maintained and funded by -z- and Dan MacDonald