• How to set sequence?
    7 replies, posted
I want to make player (a bot) to sit. I'm trying this: [lua] lua_run player.GetAll()[2]:ResetSequence(player.GetAll()[2]:LookupSequence("sit")) [/lua] Nothing happens and no errors. What I'm doing wrong?
Perhaps this will work, I've never worked with sequences though. [lua] for k,v in pairs( player.GetBots() ) do local seqSit = v:LookupSequence("sit") v:SetSequence( seqSit ) end [/lua] That should make all bots do the sequence.
[QUOTE=AgreedSpy;26330008]Perhaps this will work, I've never worked with sequences though. [lua] for k,v in pairs( player.GetBots() ) do local seqSit = v:LookupSequence("sit") v:SetSequence( seqSit ) end [/lua] That should make all bots do the sequence.[/QUOTE] Well, I'm doing almost the same, just from console and it doesn't work...
Needs to be done on both the client and the server!
[QUOTE=_nonSENSE;26334725]Needs to be done on both the client and the server![/QUOTE] So, doing [code] lua_run player.GetAll()[2]:ResetSequence(player.GetAll()[2]:LookupSequence("sit")) lua_run_cl player.GetAll()[2]:ResetSequence(player.GetAll()[2]:LookupSequence("sit")) [/code] would work?
It should but I really don't see why you'd want to do this in console.
He's probably just doing it for testing. And make sure that the sequence is valid for that player model. You can check in the source sdk model viewer
Well, it doesn't work. And yes, I checked it in model viewer.
Sorry, you need to Log In to post a reply to this thread.