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

help with gravity

broken avatar :(
Created 8 years ago
by jakob9696
0 Members and 1 Guest are viewing this topic.
1,970 views
broken avatar :(
×
broken avatar :(
Location: it
Date Registered: 18 August 2015
Last active: 4 years ago
Posts
78
Respect
Forum Rank
Rotting Walker
Primary Group
Member
My Contact & Social Links
More
Personal Quote
Call me jjakob and not jakob9696 ;)
Signature
If you find errors in my post, excuse me for my bad english... I'm italian...

Developing custom banana colada script: https://youtu.be/OW_bIbCnXzo
Developing Gobblegums script: https://youtu.be/cWGzQ1dkTAE
×
jakob9696's Groups
jakob9696's Contact & Social Linksjjakobjjakob9696
I'm scripting this new bo3 gobblegum in waw:  Newtonian Negation
it move zombies in air after their death and in game it seems that changing "phys_gravity" var from console it works very well, but changing it via script it doesn't works

Code Snippet
Plaintext
SetDvar( "phys_gravity", -1*GetDvarInt( "phys_gravity" ) );

how i can replicate this gobblegum effect in other ways?
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 4 years ago
Posts
1,895
Respect
Forum Rank
Zombie Destroyer
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
BE ORIGINAL
Signature
×
MakeCents's Groups
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
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
I'm scripting this new bo3 gobblegum in waw:  Newtonian Negation
it move zombies in air after their death and in game it seems that changing "phys_gravity" var from console it works very well, but changing it via script it doesn't works

Code Snippet
Plaintext
SetDvar( "phys_gravity", -1*GetDvarInt( "phys_gravity" ) );

how i can replicate this gobblegum effect in other ways?

I think people do this via animation, rather than dvar? If I understand you correctly. The zombies float upward?
Last Edit: September 08, 2016, 04:19:09 pm by MakeCents
broken avatar :(
×
broken avatar :(
OnionmanVere Bo21
Location: ieu dnt wnt 2 no
Date Registered: 27 September 2013
Last active: 1 year ago
Posts
1,864
Respect
Forum Rank
Zombie Destroyer
Primary Group
Community Mapper
My Groups
More
Personal Quote
ok
Signature
Aye mate you don't know me so y don't you shut tf up ok buddy :)

×
Scobalula's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Box Mappers Elite
Box Mappers Elite
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Scobalula's Contact & Social Links
I think people do this via animation, rather than dvar? If I understand you correctly. The zombies float upward?

Yeah in BO1 for the Microwave Gun for example it's done via Animation instead of using dvars and gravity.
broken avatar :(
×
broken avatar :(
Location: it
Date Registered: 18 August 2015
Last active: 4 years ago
Posts
78
Respect
Forum Rank
Rotting Walker
Primary Group
Member
My Contact & Social Links
More
Personal Quote
Call me jjakob and not jakob9696 ;)
×
jakob9696's Groups
jakob9696's Contact & Social Linksjjakobjjakob9696
I think people do this via animation, rather than dvar? If I understand you correctly. The zombies float upward?
yes i would like zombies float upward instead fall on ground after their deaths and i would try without animations first...
however i "fixed" it with this:
Code Snippet
Plaintext
gum_zombie_gravity()
{

gravity = GetDvarInt( "phys_gravity" );
players = GetPlayers();
for(i = 0; i < players.size; i++ )
players[ i ] setClientDvar(  "phys_gravity" , -1*gravity );

self waittill_any( "take_gumball", "end_gumball" , "force_end_gumball" ); // this is managed by others functions

for(i = 0; i < players.size; i++ )
players[ i ] setClientDvar(  "phys_gravity" , gravity );
}

but i think this dvar will affect other things that aren't zombies, then i tried using this function on every zombies:
Code Snippet
Plaintext
gum_zombie_gravity()
{
zombies = getAiSpeciesArray( "axis", "all" );
for( i = 0; i < zombies.size; i++ )
{
zombies[ i ] thread fly_on_death();
}
}
fly_on_death()
{
self waittill( "death" );
self moveGravity( (0,0,1000), 5);
}
but zombies don't move  :(

 
Loading ...