UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

Play an anim on a model

HOT
broken avatar :(
Created 11 years ago
by Soy-Yo
0 Members and 1 Guest are viewing this topic.
12,145 views
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 6 years ago
Posts
1,895
Respect
Forum Rank
Zombie Destroyer
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
BE ORIGINAL
Signature
×
MakeCents's Groups
Mapper Has released one or more maps to the UGX-Mods community.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
Definitely it can't be a scripting issue. I added this line to the code...
Code Snippet
Plaintext
iPrintLnBold(isDefined(self),isDefined(#animtree),isDefined(%cube_doors_open),self==door); // "door" is the door model
...and it prints "1111", so everything is well defined and "self" is the door.

Well like most things in modding waw, one little damn thing is all it takes and it doesn't work. But if it is something to do with the model, I unfortunately lack the knowledge. As far as making sure everything is in game, if you've done that, I would recommend asking someone that knows animated models to look at it, and confirm the animation works with the model and what not.
Last Edit: October 02, 2015, 02:09:59 pm by MakeCents
broken avatar :(
×
broken avatar :(
Location: gbMilton Keynes
Date Registered: 17 January 2014
Last active: 6 years ago
Posts
6,875
Respect
Forum Rank
Immortal
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
Signature
If you want scripts / features made for you, then contact me by PM or email / skype etc
it will cost you tho so if you have no intention of reciprocating don't even waste my time ;)
×
Harry Bo21's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Harry Bo21's Contact & Social LinksHarryBo000[email protected]HarryBo21
I got the PM sending me the model but forgot all about it lol

my bad man, will check it when i get in after work
broken avatar :(
×
broken avatar :(
Location: esMadrid
Date Registered: 27 March 2015
Last active: 5 years ago
Posts
371
Respect
Forum Rank
Perk Hacker
Primary Group
Member
My Contact & Social Links
More
Personal Quote
JIGGLYPUFF used SING! YOU fell asleep!
Signature
×
Soy-Yo's Groups
Soy-Yo's Contact & Social LinksSoy-yoElCerdoRey
I got the PM sending me the model but forgot all about it lol

my bad man, will check it when i get in after work
No problem. ;)
I made changes to the file I sent you but I used basically the same method so it still doesn't work.

Also I noticed I had an error in the script and now the setModel() works. I haven't mentioned it before because I didn't realise it wasn't working. :D
broken avatar :(
×
broken avatar :(
Location: gbMilton Keynes
Date Registered: 17 January 2014
Last active: 6 years ago
Posts
6,875
Respect
Forum Rank
Immortal
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
×
Harry Bo21's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Harry Bo21's Contact & Social LinksHarryBo000[email protected]HarryBo21
No problem. ;)
I made changes to the file I sent you but I used basically the same method so it still doesn't work.

Also I noticed I had an error in the script and now the setModel() works. I haven't mentioned it before because I didn't realise it wasn't working. :D
can you either post or pm me the script so i can check it fully? anim tree too
broken avatar :(
×
broken avatar :(
Location: esMadrid
Date Registered: 27 March 2015
Last active: 5 years ago
Posts
371
Respect
Forum Rank
Perk Hacker
Primary Group
Member
My Contact & Social Links
More
Personal Quote
JIGGLYPUFF used SING! YOU fell asleep!
×
Soy-Yo's Groups
Soy-Yo's Contact & Social LinksSoy-yoElCerdoRey
can you either post or pm me the script so i can check it fully? anim tree too
Code Snippet
Plaintext
startDoorsAnim() {
    door = getEnt( "cube_door","targetname" );
    door thread waitDoor();
}

#using_animtree( "cube_doors" );
waitDoor(){
    wait(5);
while(1){
       
self UseAnimTree(#animtree);
       
self SetAnim(%cube_doors_open);
                wait( getanimlength( %cube_doors_open );
       
self clearanim( %cube_doors_open, 0 );
self setModel("cube_doors_opened");
       
                iPrintLnBold(self.model);

                wait(2);
       
self SetAnim(%cube_doors_close);
                wait( getanimlength( %cube_doors_close ) );
self setModel("cube_doors");
       
self clearanim( %cube_doors_close, 0 );
}
}

cube_doors.atr:
Code Snippet
Plaintext
cube_doors_open
cube_doors_close
broken avatar :(
×
broken avatar :(
Location: gbMilton Keynes
Date Registered: 17 January 2014
Last active: 6 years ago
Posts
6,875
Respect
Forum Rank
Immortal
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
×
Harry Bo21's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Harry Bo21's Contact & Social LinksHarryBo000[email protected]HarryBo21
have you tried setAnimScripted() instead?

To this day i never worked out why, but SetAnim messed up the origins box and SetAnimScripted didnt

if your not clearing the anim you wont need a "open" model btw. All my mystery boxes have "open / close" and one model
Last Edit: October 10, 2015, 11:39:41 pm by Harry Bo21
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 6 years ago
Posts
1,895
Respect
Forum Rank
Zombie Destroyer
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
BE ORIGINAL
×
MakeCents's Groups
Mapper Has released one or more maps to the UGX-Mods community.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
have you tried setAnimScripted() instead?

To this day i never worked out why, but SetAnim messed up the origins box and SetAnimScripted didnt

if your not clearing the anim you wont need a "open" model btw. All my mystery boxes have "open / close" and one model

I use AnimScripted for zombies, forget why, codmod told me once I think. All the anims, I received for all my stuff, since I don't do anims or models yet myself, have been looping. That is why I keep mentioning, if it is a looping anim. If your anim opens and holds, then I guess you won't need another model to hold it open, cause using two models is based on your animation. If it is a looping anim, you have to set the open model when opening after the anim plays. Clear isn't needed at all I don't think, I just add it all the time.

If you wanted to try AnimScripted you could try this, but I use both and have the same result on all my anims on robots,doors,stuff, but not tested setanim on zombies.

Code Snippet
Plaintext
startDoorsAnim() {
    door = getEnt( "cube_door","targetname" );
    door thread waitDoor();
}

#using_animtree( "cube_doors" );
waitDoor(){
    wait(5);
while(1){
       
self UseAnimTree(#animtree);
       
self AnimScripted("open_door",self.origin,self.angles,%cube_doors_open);
                self waittill("open_door", end);
       
self clearanim( %cube_doors_open, 0 );
self setModel("cube_doors_opened");//remove line if using one model without looping anims
       
                iPrintLnBold(self.model);

                wait(2);
       
self SetAnim(%cube_doors_close);
self AnimScripted("close_door",self.origin,self.angles,%cube_doors_close);
                self waittill("close_door", end);
self setModel("cube_doors");//remove line if using one model without looping anims
       
self clearanim( %cube_doors_close, 0 );
}
}
Last Edit: October 11, 2015, 02:39:48 am by MakeCents
broken avatar :(
×
broken avatar :(
Location: gbMilton Keynes
Date Registered: 17 January 2014
Last active: 6 years ago
Posts
6,875
Respect
Forum Rank
Immortal
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
×
Harry Bo21's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Harry Bo21's Contact & Social LinksHarryBo000[email protected]HarryBo21
I use AnimScripted for zombies, forget why, codmod told me once I think. All the anims, I received for all my stuff, since I don't do anims or models yet myself, have been looping. That is why I keep mentioning, if it is a looping anim. If your anim opens and holds, then I guess you won't need another model to hold it open, cause using two models is based on your animation. If it is a looping anim, you have to set the open model when opening after the anim plays. Clear isn't needed at all I don't think, I just add it all the time.

If you wanted to try AnimScripted you could try this, but I use both and have the same result on all my anims on robots,doors,stuff, but not tested setanim on zombies.

Code Snippet
Plaintext
startDoorsAnim() {
    door = getEnt( "cube_door","targetname" );
    door thread waitDoor();
}

#using_animtree( "cube_doors" );
waitDoor(){
    wait(5);
while(1){
       
self UseAnimTree(#animtree);
       
self AnimScripted("open_door",self.origin,self.angles,%cube_doors_open);
                self waittill("open_door", end);
       
self clearanim( %cube_doors_open, 0 );
self setModel("cube_doors_opened");//remove line if using one model without looping anims
       
                iPrintLnBold(self.model);

                wait(2);
       
self SetAnim(%cube_doors_close);
self AnimScripted("close_door",self.origin,self.angles,%cube_doors_close);
                self waittill("close_door", end);
self setModel("cube_doors");//remove line if using one model without looping anims
       
self clearanim( %cube_doors_close, 0 );
}
}
your prob right and it wont help, but just a thought

My origins box wasnt "not animating", but the lid would barely raise, despite in the anim itself it should have been about 200 feet above me ( lol i did that to see what the hell was going on )

When i changed it to animscripted it started raising to the place i had actually set in the anim. I still dont understand the difference between the two functions tbh lol



Clear is needed with setAnim, but not SetAnimScripted. Or so good ol Redspace taught me ;)
Last Edit: October 11, 2015, 02:44:14 am by Harry Bo21
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 6 years ago
Posts
1,895
Respect
Forum Rank
Zombie Destroyer
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
BE ORIGINAL
×
MakeCents's Groups
Mapper Has released one or more maps to the UGX-Mods community.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
your prob right and it wont help, but just a thought

My origins box wasnt "not animating", but the lid would barely raise, despite in the anim itself it should have been about 200 feet above me ( lol i did that to see what the hell was going on )

When i changed it to animscripted it started raising to the place i had actually set in the anim. I still dont understand the difference between the two functions tbh lol



Clear is needed with setAnim, but not SetAnimScripted. Or so good ol Redspace taught me ;)

I'm not familiar with SET animscripted. You only need the clear to stop the looping anim, I think, if desired. Your issue would happen with a small wait in a while loop and you keep setting the anim without waiting till the anim was done, most likely.
Last Edit: October 11, 2015, 03:05:15 am by MakeCents
broken avatar :(
×
broken avatar :(
Location: gbMilton Keynes
Date Registered: 17 January 2014
Last active: 6 years ago
Posts
6,875
Respect
Forum Rank
Immortal
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
×
Harry Bo21's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Harry Bo21's Contact & Social LinksHarryBo000[email protected]HarryBo21
I'm not familiar with SET animscripted. You only need the clear to stop the looping anim, I think, if desired. Your issue would happen with a small wait in a while loop and you keep setting the anim without waiting till the anim was done, most likely.
sorry that was a typo, i meant this animscripted ( i think lol )

clearanim is also to put the model back to its static position

theres 7 anims for the origins pap, i can play them one after another and watch it slowly build, clear anim then puts it back to "disassembled". I think if you use "delta" converted anims its important to force the model back to its original position as playing the tranzit boxs raise anim twice, will make it just raise again, from already being raised in the air lol

Stuffy is prob the epert on this I guess  ;D
Last Edit: October 11, 2015, 03:12:26 am by Harry Bo21
broken avatar :(
×
broken avatar :(
Location: esMadrid
Date Registered: 27 March 2015
Last active: 5 years ago
Posts
371
Respect
Forum Rank
Perk Hacker
Primary Group
Member
My Contact & Social Links
More
Personal Quote
JIGGLYPUFF used SING! YOU fell asleep!
×
Soy-Yo's Groups
Soy-Yo's Contact & Social LinksSoy-yoElCerdoRey
Not working with animScripted neither. :-\
It only waits until the animation is supposed to be done and changes the model (I'm using a looping anim).
But yesterday, with the other script (setAnim), it played an anim. It wasn't the anim I wanted (it deformed the doors just a bit, without moving them, and they changed to the other model) and when I changed to other anim didn't work again. But I can't remember which anim or model I was using lol.
broken avatar :(
×
broken avatar :(
Location: gbMilton Keynes
Date Registered: 17 January 2014
Last active: 6 years ago
Posts
6,875
Respect
Forum Rank
Immortal
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
×
Harry Bo21's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Harry Bo21's Contact & Social LinksHarryBo000[email protected]HarryBo21
Not working with animScripted neither. :-\
It only waits until the animation is supposed to be done and changes the model (I'm using a looping anim).
But yesterday, with the other script (setAnim), it played an anim. It wasn't the anim I wanted (it deformed the doors just a bit, without moving them, and they changed to the other model) and when I changed to other anim didn't work again. But I can't remember which anim or model I was using lol.
did you convert relative or delta in assman
broken avatar :(
×
broken avatar :(
Location: esMadrid
Date Registered: 27 March 2015
Last active: 5 years ago
Posts
371
Respect
Forum Rank
Perk Hacker
Primary Group
Member
My Contact & Social Links
More
Personal Quote
JIGGLYPUFF used SING! YOU fell asleep!
×
Soy-Yo's Groups
Soy-Yo's Contact & Social LinksSoy-yoElCerdoRey
did you convert relative or delta in assman
At the beginning relative. Now I use delta.
broken avatar :(
×
broken avatar :(
Location: gbMilton Keynes
Date Registered: 17 January 2014
Last active: 6 years ago
Posts
6,875
Respect
Forum Rank
Immortal
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
×
Harry Bo21's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Harry Bo21's Contact & Social LinksHarryBo000[email protected]HarryBo21
At the beginning relative. Now I use delta.
delta is for ai

so I moves them, instead of "appearing" to move them. Try relative again with all the changes you've done to the script now
broken avatar :(
×
broken avatar :(
Location: esMadrid
Date Registered: 27 March 2015
Last active: 5 years ago
Posts
371
Respect
Forum Rank
Perk Hacker
Primary Group
Member
My Contact & Social Links
More
Personal Quote
JIGGLYPUFF used SING! YOU fell asleep!
×
Soy-Yo's Groups
Soy-Yo's Contact & Social LinksSoy-yoElCerdoRey
delta is for ai

so I moves them, instead of "appearing" to move them. Try relative again with all the changes you've done to the script now
I'm trying hundreds of combinations with model, anim and assman settings lol. Nothing works. I'm pretty sure the error must be in the most stupid and simple thing but I can't see it. :(

Double Post Merge: October 11, 2015, 07:38:47 pm
Finally BluntStuffy fixed it. <3
The problem was on the joints. I didn't animate them or something. :derp:
Thank you all guys for your help. :)
Last Edit: October 11, 2015, 07:39:03 pm by Soy-Yo

 
Loading ...