Author Topic: Deleting a clone  (Read 3208 times)

I found a script, I don't know if it was built into Torque or not (%client.createPlayer) but it creates a clone of your current name and appearance, I have a script that's supposed to change your name, clone you, then respawn you, change your name back and the clone will delete after about 5 minutes, I have everything but the clone destroying itself part, how would I make it so the clone will delete itself after a certain amount of time? (I would prefer for it to explode), and how would I make it so I can delete all clones in a server using a serverCmd?

I think this will work:

Code: [Select]
%clone.schedule(5 * 60000,0,"removeBody");

Console says - removeBody: Unknown command.

Alright, just do this then:

Code: [Select]
%clone.schedule(5 * 60000,0,"delete");
I'll get you the code for adding the *poof* later.

Try
Code: [Select]
%clone.schedule(5 * 60000,"removeBody");

Hmm, perhaps.  I'm not sure if removing the "0" after the "60000" will affect anything.

Yeah, the 0 indicates that its just calling a function, while not having a 0 indicates that it is calling a method on the object. You must be high or something.  :cookieMonster:

I thought the "0" was a place holder for giving the schedule an event ID.

If it was a method you were scheduling then it would be
Code: [Select]
[obj].schedule( [time], "methodname");

Yeah exidyne, I understand what Ephialtes said.  The second field in the schedule function is for an object ID rather than an event ID.  I was simply mistaken.  You are simply an ass.

All the scripts you guys have suggested so far return an error about how the game can't find object ' '.

On which type of object are you calling the method?

I told you, I am using %client.createPlayer to make a clone of the player, then I want that clone to die after a bit, like when you Self Delete.

That means the %clone object ID is not valid.

So how would you make it an object? Me and Trigun tried tons of stuff and nothing worked.