Author Topic: Iban Explains it All  (Read 5281 times)


I may as well dump a bit of info here now that Iban is gone:

Conditionals:
A little-known technique for doing quick if-checks
Code: [Select]
(<condition> ? <if true> : <if false>)
examples:
%client.chatMessage("You have" SPC %client.clamCount SPC (%client.clamCount>1 ? "clams" : "clam"));
%blah=(%use==false ? true : %use); //if %use was "bananas" then %blah would be "bananas", but if %use was false then %blah would be true

"Attaching" particle emitters to objects
This is for attaching emitters to objects when it cannot be accomplished by adding it onto a datablock, which, if you can, you should do instead. Lets start by adding the actual emitter object, we'll make it the fire A emitter:
Code: [Select]
%emitter=new ParticleEmitterNode()
{
   dataBlock="GenericEmitterNode";
   position="0 0 0";
   emitter="burnEmitterA";
};
MissionCleanup.add(%emitter);
This isn't going to be possible without entering the emitter into some kind of loop..
Code: [Select]
%emitter.enterAttachLoop(%obj)now lets actually set up the loop method
Code: [Select]
function ParticleEmitterNode::enterAttachLoop(%this,%obj)
{
   //this is working off the assumption that you wont enter the emitter in more than once
   //we make sure the object exists when we point to the object from the emitter
   //while also making sure that the currently attached object exists
   if(%this.attached!=%obj)
      %this.attached=%obj;
   if(!isObject(%this.attached))
      return;

   //setTransform moves the emitter to the position of the object
   %this.setTransform(%obj.position SPC "0 0 0 0");

   //this updates the emitters position, this is the part I'd imagine would be hard to find
   %this.inspectPostApply();

   //we repeat the function in 150 milliseconds, creating the loop
   %this.schedule(150,0,"enterAttachLoop",%obj);
}
« Last Edit: November 15, 2011, 06:19:26 PM by dUMBELLS »

I am confused. You are not Iban.

I am confused. You are not Iban.
Where have you been lately?

Also, Iban got banned again... Ooooo

Where have you been lately?

Also, Iban got banned again... Ooooo
But then why did Ichverbot post this if he's not Iban?

But then why did Ichverbot post this if he's not Iban?
Ichverbot is Iban.  :iceCream:

Ichverbot is Iban.
Ok, I thought he was just some person who stole Iban's avatar.

But then why did Ichverbot post this if he's not Iban?
Ichverbot is Iban, as dUMBELLS said. He got the name from his site or something, but yes, he got banned again.

*Iban creates an alt
*Iban creates a coding help thread
*Iban gets banned
*Iban's coding help thread dies
*Iban creates an alt
*Iban creates a coding help thread
*Iban gets banned
???

I wonder how long the ban is and if he's coming back.

This is beautiful, thanks for the basics!

I wonder how long the ban is and if he's coming back.

It was perma