Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: disappearing clonePlayer()

  1. #1
    Private First Class RobsoN's Avatar
    Join Date
    Jan 2013
    Location
    /home/cod2/
    Posts
    230
    Thanks
    119
    Thanked 95 Times in 64 Posts

    disappearing clonePlayer()

    Hello everyone.

    I want to clone player, while he is operating some device (something like predator, helicopter from newer versions of cod). Clone is dissapering after few deaths from other player. I think death animation from other players force to delete long ago spawned clonePlayer(). Is it possible to bypass this? I have tought about just 3 static player models (no anim etc.) 1: stand position, 2:crouch position, 3:prone position. If you have idea how to create that model or any tips for me, I'll be grateful.

    Regads, RobsoN.
    "Don't worry if your code doesn't work correctly - if everything worked, you would not work" ~Mosher's right

  2. #2
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    2,010
    Thanks
    2,102
    Thanked 1,084 Times in 753 Posts
    Can you upload a testable .iwd?
    timescale 0.01

  3. #3
    Private First Class RobsoN's Avatar
    Join Date
    Jan 2013
    Location
    /home/cod2/
    Posts
    230
    Thanks
    119
    Thanked 95 Times in 64 Posts
    .iwd of what?
    "Don't worry if your code doesn't work correctly - if everything worked, you would not work" ~Mosher's right

  4. #4
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    2,010
    Thanks
    2,102
    Thanked 1,084 Times in 753 Posts
    With the xanim + cloneplayer-script. Just so we can test the bug and then try to find a solution.
    timescale 0.01

  5. #5
    Brigadier General
    Join Date
    Oct 2012
    Posts
    994
    Thanks
    20
    Thanked 588 Times in 388 Posts
    Quote Originally Posted by RobsoN View Post
    Hello everyone.

    I want to clone player, while he is operating some device (something like predator, helicopter from newer versions of cod). Clone is dissapering after few deaths from other player. I think death animation from other players force to delete long ago spawned clonePlayer(). Is it possible to bypass this? I have tought about just 3 static player models (no anim etc.) 1: stand position, 2:crouch position, 3rone position. If you have idea how to create that model or any tips for me, I'll be grateful.

    Regads, RobsoN.
    You need set the time the clone stays in the map:

    Code:
    self clonePlayer( 120 );
    That will make the clone stay for 120 seconds.

    I've worked quite extensively with this function, because I devised a perk called "decoy", where I made the player invisible, cloned him, and the player could then lie in wait until an enemy came along and started shooting the clone. Then, the player could take his time and shoot the enemy. I gave up the idea because when you clone someone, the clone will take on the very last animation that the player was making right before he was cloned - so if he was running, the clone runs in place, like he had 999 pinged out. It didn't look right, so I scrapped the idea. Feel free to take up the idea if you want.
    Last edited by Tally; 5th December 2013 at 09:36.

  6. #6
    Private First Class RobsoN's Avatar
    Join Date
    Jan 2013
    Location
    /home/cod2/
    Posts
    230
    Thanks
    119
    Thanked 95 Times in 64 Posts
    I don't have model or xanim. I just have set
    PHP Code:
    self.marker["clone"] = self clonePlayer(100000); 
    , and after some time it deletes.
    "Don't worry if your code doesn't work correctly - if everything worked, you would not work" ~Mosher's right

  7. #7
    Brigadier General
    Join Date
    Oct 2012
    Posts
    994
    Thanks
    20
    Thanked 588 Times in 388 Posts
    Quote Originally Posted by RobsoN View Post
    I don't have model or xanim. I just have set
    PHP Code:
    self.marker["clone"] = self clonePlayer(100000); 
    , and after some time it deletes.
    100000 is pointless, as the time is capped at 200. How long are you wanting the clone to stay?

    As for the clone disappearing after other players die a few times, this is because the engine wont allow too many clones at the same time. You could play around with the corpse count dvar in your config file. That might give you longer, but as soon as the corpse count is up, the engine will auto delete any remaining clones as too much of a burden on the engine.
    Last edited by Tally; 5th December 2013 at 15:43.

  8. The Following 2 Users Say Thank You to Tally For This Useful Post:

    kung foo man (5th December 2013),RobsoN (5th December 2013)

  9. #8
    Private First Class RobsoN's Avatar
    Join Date
    Jan 2013
    Location
    /home/cod2/
    Posts
    230
    Thanks
    119
    Thanked 95 Times in 64 Posts
    Max 70 seconds, so I'll change. What about models? Does anyone have 3 models of 3 stances in .obj or xmodel (I'm newbie at modelling and 3d-graphics).
    "Don't worry if your code doesn't work correctly - if everything worked, you would not work" ~Mosher's right

  10. #9
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    At least for normal xmodels, if you put the .origin inside a brush, it disappears.

    Try to keep that from happening.

  11. #10
    Private First Class RobsoN's Avatar
    Join Date
    Jan 2013
    Location
    /home/cod2/
    Posts
    230
    Thanks
    119
    Thanked 95 Times in 64 Posts
    I'm sorry but I can't understand you, IzNoGoD.

    I request for the model (after thoughts may even be in one position, preferably crouch) or a link to such model. I searched the internet and found only models with outstretched hands.
    "Don't worry if your code doesn't work correctly - if everything worked, you would not work" ~Mosher's right

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •