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 me with FX (SP)

broken avatar :(
Created 7 years ago
by artsergo
0 Members and 1 Guest are viewing this topic.
3,192 views
broken avatar :(
×
broken avatar :(
Location: rusiberia
Date Registered: 3 January 2017
Last active: 7 years ago
Posts
78
Respect
Forum Rank
Rotting Walker
Primary Group
Member
My Contact & Social Links
More
Personal Quote
Goodluck for all !
Signature
Believe in your strength, anytime, anywhere!
Only you can force yourself to change something in your life!
But In general, the world itself is beautiful if  you be optimist :)
×
artsergo's Groups
artsergo's Contact & Social Linksartsibsergeiartsergoartsergo
I have idea.  :)
I understand that in theory is quite possible to do, but how?
I want make in map.

When I run over a tunnel then I touch trigger_radius (or trigger_multiple) and it launches two effects:
- effect of shaking ground in (targetname = location1) on my map (with ability to setting force in time of shaking again),
- FX little fall dust from ceiling.

I understand that this trigger gives the command to start for  the effect of shaking and FX little fall dust from the ceiling when the trigger activited.

I have only one example script for running - shaking of the earth (with the ability to setting for force shaking of the earth and jerky repetition period between). And that is all.

But how all this is to tie together the trigger and all this shake and FX, that when one player touch this trigger all this to working?
But when a player get out from zone of this trigger then the effect of shaking of the earth and FX little fall dust from ceiling  - both is switched off.
But all this was repeat when one player reenters the action trigger zone.
how i understand this is working - trigger_multiple.


Script is shaking of the earth: 

Code Snippet
Plaintext
 main() {
        thread shake();

   //your other code
}

shake()
{
   for(;;){
           earthquake(0.2,5,(0,0,0),1400);  //0.4 - setting for force shaking (0.3 is default)
                                                               //5 - the duration of the shaking of the earth
                                                               //      (in seconds is 10)
                                                               //1400 - radius of the earthquake
           wait(RandomFloatRange(5,45)); //default 20,300

           wait(5);
          }
}


Help me for resolve this problem, all tie together, please.  :-\
(and yes, such an example i see even in CoD2, where you go in some of the maps in tunnel with allies and there it FX and Shake earth is working.

i don't remember that it the map, but in the map has captain Price, tanks and sand ground


Help me for resolve this problem, please.  ::)
This topic contains a post which is marked as the Best Answer. Click here to view it.
broken avatar :(
×
broken avatar :(
Location: gbMilton Keynes
Date Registered: 17 January 2014
Last active: 4 years ago
Posts
6,877
Respect
1,004Add +1
Forum Rank
Immortal
Primary Group
Community 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.
Community 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 Links[email protected]HarryBo21HarryBo000
Thread on trigger

Code Snippet
Plaintext
trigger_logic()
{
    Self waittill( "trigger", player );
    // what do do here
}
broken avatar :(
×
broken avatar :(
Location: rusiberia
Date Registered: 3 January 2017
Last active: 7 years ago
Posts
78
Respect
Forum Rank
Rotting Walker
Primary Group
Member
My Contact & Social Links
More
Personal Quote
Goodluck for all !
×
artsergo's Groups
artsergo's Contact & Social Linksartsibsergeiartsergoartsergo
Harry Bo21, hi!

Thank!
But how this trigger_multiple using with shake ground and FX in the radius?
broken avatar :(
×
broken avatar :(
Location: gbMilton Keynes
Date Registered: 17 January 2014
Last active: 4 years ago
Posts
6,877
Respect
1,004Add +1
Forum Rank
Immortal
Primary Group
Community 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.
Community 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 Links[email protected]HarryBo21HarryBo000
That code will trigger whenever you touch a trigger multiple
broken avatar :(
×
broken avatar :(
Location: rusiberia
Date Registered: 3 January 2017
Last active: 7 years ago
Posts
78
Respect
Forum Rank
Rotting Walker
Primary Group
Member
My Contact & Social Links
More
Personal Quote
Goodluck for all !
×
artsergo's Groups
artsergo's Contact & Social Linksartsibsergeiartsergoartsergo
how may looking this code
if need that trigger launches two things:

- effect of shaking ground in (targetname = location1) on my map
  (with ability to setting force in time of shaking again),
- FX little fall dust from ceiling.

and if a player go out from trigger then shaking ground and FX little fall dust - both is switched off.

broken avatar :(
×
broken avatar :(
Location: gbMilton Keynes
Date Registered: 17 January 2014
Last active: 4 years ago
Posts
6,877
Respect
1,004Add +1
Forum Rank
Immortal
Primary Group
Community 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.
Community 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 Links[email protected]HarryBo21HarryBo000
Add your code to what I posted?

And use

Playfx( fx, origin );
broken avatar :(
×
broken avatar :(
Location: rusiberia
Date Registered: 3 January 2017
Last active: 7 years ago
Posts
78
Respect
Forum Rank
Rotting Walker
Primary Group
Member
My Contact & Social Links
More
Personal Quote
Goodluck for all !
×
artsergo's Groups
artsergo's Contact & Social Linksartsibsergeiartsergoartsergo
i understanding after this line:

Code Snippet
Plaintext
   Self waittill( "trigger", player ); 


write: 
Code Snippet
Plaintext
 Playfx( fx, origin ); 

but How can make with shake script?
if his loading then not is - switched off.

I need then both such effects is - switched off if you go out from trigger

i such understanding this code need
Code Snippet
Plaintext
if { ..... }

But what can it looking ))
Last Edit: January 15, 2017, 01:08:35 pm by artsergo
broken avatar :(
×
broken avatar :(
Location: rusiberia
Date Registered: 3 January 2017
Last active: 7 years ago
Posts
78
Respect
Forum Rank
Rotting Walker
Primary Group
Member
My Contact & Social Links
More
Personal Quote
Goodluck for all !
×
artsergo's Groups
artsergo's Contact & Social Linksartsibsergeiartsergoartsergo
Maybe anybody know?
Marked as best answer by artsergo 7 years ago
broken avatar :(
×
broken avatar :(
Location: nlApeldoorn
Date Registered: 17 December 2013
Last active: 1 year ago
Posts
1,187
Respect
1,404Add +1
Forum Rank
Zombie Colossus
Primary Group
Community Scripter Elite
My Groups
More
My Contact & Social Links
More
Personal Quote
It aint much, if it aint Dutch
Signature
×
BluntStuffy's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Scripter Elite Has shown excellence and experience in the area of custom scripting in the UGX-Mods community.
Oil Rig Beta Access
Oil Rig Beta Access
BluntStuffy's Contact & Social LinksBluntstuffy@BluntZombieBluntStuffyStuffyZombie
Try this, i tried to write it easy to understand. Think it should work, not tested though  ::)

-Use 1 trigger_multiple that covers the entire area where you want the effects to happen.
-Use one script_struct ( NOT script_origin ) for the center of the earthquake
-Use one or more script_struct's (!) for the locations of the FX

You can find the targetname KVP at the top of the script

The fx needs to be a one-shot ( not looping ) FX, or this code will not work propperly and the fx wont stop playing..

Code Snippet
Plaintext
init()
{
level._effect[ "DUST" ] = Loadfx( "..." );

trigger = getent( "tunnel_trig", "targetname" ); // get the correct trigger
earthquake_org = getstruct( "tunnel_quake", "targetname" ); // use a SCRIPT_STRUCT for the center of the earthquake
dust_org = getstructarray( "tunnel_dust", "targetname" ); // use one or more SCRIPT_STRUCT's for the fx origin(s)
level.tunnel_shake = false;

level thread tunnel_stuff(trigger);
level thread shake(earthquake_org);
level thread dust(dust_org);
}

tunnel_stuff(trigger)
{
while(1)
{
count = 0;
players = get_players();

for( i=0 ; i<players.size ; i++ )
{
if( players[i] istouching( trigger ) ) // count all players touching the trigger, if at least one is touching it activate the stuff
{
count++;
break;
}
}

if( count > 0 && level.tunnel_shake == false )
{
level.tunnel_shake = true;
}

else if( count == 0 && level.tunnel_shake == true )
{
level.tunnel_shake = false;
}

wait 0.5;
}
}

shake(earthquake_org)
{
while(1)
{
if( level.tunnel_shake == true )
{
earthquake(0.2,5,earthquake_org.origin,1400);
wait(RandomFloatRange(5,45));

wait(5);
}

wait 0.5;
}
}

dust(dust_org)
{
while(1)
{
if( level.tunnel_shake == true )
{
for( i=0 ; i<dust_org.size ; i++ )
{
playfx( level._effect["DUST"], dust_org[i].origin );
}
wait(5); // match the time of your fx here to loop it correctly
}
wait 0.1;

if( level.tunnel_shake == false )
wait 0.5;
}
}




Put this in _zombiemode around line 60-70

Code Snippet
Plaintext
	maps\GSC_FILENAME::init();
Last Edit: January 17, 2017, 07:31:19 pm by BluntStuffy
broken avatar :(
×
broken avatar :(
Location: rusiberia
Date Registered: 3 January 2017
Last active: 7 years ago
Posts
78
Respect
Forum Rank
Rotting Walker
Primary Group
Member
My Contact & Social Links
More
Personal Quote
Goodluck for all !
×
artsergo's Groups
artsergo's Contact & Social Linksartsibsergeiartsergoartsergo
Wow! BluntStuffy thanks!  ::)

I should try this)

and if all ok, I write about how this working.  :)

Double Post Merge: January 18, 2017, 07:59:07 pm
BluntStuffy hi!  :)
 Thank you very very much!

 You very helping me!
 include this (source archive: full source):  http://www.mediafire.com/file/iea0e5pg17lgwuw/sp_shake_dst.rar
yes, this archive has some errors with FX godrays but right now, this is no important

Most importantly, Shake and dusts workable! this is cool!

thank you again!  :)
 
in general, it is a working example - driving an earthquake and the effects inherent for earthquake )

And yes, BluntStuffy, i don't used "_zombiemode" library , this is working without "_zombiemode")


Double Post Merge: January 18, 2017, 08:12:59 pm
Last Edit: January 18, 2017, 08:12:59 pm by artsergo

 
Loading ...