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

How To Make A Brush Moving From Point A To Point B (As Seen In Cheese) ?

broken avatar :(
Created 8 years ago
by yoman321
0 Members and 1 Guest are viewing this topic.
2,066 views
broken avatar :(
×
broken avatar :(
Location: fr
Date Registered: 21 December 2015
Last active: 2 years ago
Posts
76
Respect
Forum Rank
Rotting Walker
Primary Group
Member
My Contact & Social Links
More
×
yoman321's Groups
yoman321's Contact & Social LinksTheSuperDude
hey, So I was Wondering How I Could Make A Brush Moving During The Game, not fast, From Point A To Point B. And, I would like this brush to kill the player if he touched it ( as seen in cheese ). And If Possible, That The Brush Has No bullet Impact, exactly like in cheese! Anyone Know How I could Do That?

Thanks For Your Time! :D
broken avatar :(
×
broken avatar :(
Senpai
Location: us
Date Registered: 28 September 2013
Last active: 3 years ago
Posts
605
Respect
Forum Rank
Zombie Enslaver
Primary Group
Box Mappers Elite
My Groups
More
My Contact & Social Links
More
×
arceus's Groups
Box Mappers Elite
Box Mappers Elite
arceus's Contact & Social LinksarceusNT
you'd  have to draw your brush then make it a script_brushmodel and a script_origin in radiant, then give them a kvp that you could get in script, after you get them in script you'll have to basically do this:
Code Snippet
Plaintext
	time = 1; //how long you want the move to take in seconds
object1 moveto(object2.origin, time);
broken avatar :(
×
broken avatar :(
Location: fr
Date Registered: 21 December 2015
Last active: 2 years ago
Posts
76
Respect
Forum Rank
Rotting Walker
Primary Group
Member
My Contact & Social Links
More
×
yoman321's Groups
yoman321's Contact & Social LinksTheSuperDude
you'd  have to draw your brush then make it a script_brushmodel and a script_origin in radiant, then give them a kvp that you could get in script, after you get them in script you'll have to basically do this:
Code Snippet
Plaintext
	time = 1; //how long you want the move to take in seconds
object1 moveto(object2.origin, time);
Thanks :D ! But, Will it have bullet impact on it while its moving, also, How Do I make it Starting At A specific round and How Can I make it Killing / damaging the player ?
broken avatar :(
×
broken avatar :(
Senpai
Location: us
Date Registered: 28 September 2013
Last active: 3 years ago
Posts
605
Respect
Forum Rank
Zombie Enslaver
Primary Group
Box Mappers Elite
My Groups
More
My Contact & Social Links
More
×
arceus's Groups
Box Mappers Elite
Box Mappers Elite
arceus's Contact & Social LinksarceusNT
it will have bullet hits on it, the other ones are possible to do but i don't have the time to go into detail, if no one else helps i might help at a latter point, sorry i can't help now.
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 30 December 2012
Last active: 9 months ago
Posts
577
Respect
Forum Rank
Zombie Enslaver
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Signature
My preferred name is "xSanchez78".
Check me out here: www.steamcommunity.com/id/xSanchez78
×
alaurenc9'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.
alaurenc9's Contact & Social LinksxSanchez78xSanchez78xSanchez78xSanchez78xSanchez78xSanchez78
Code Snippet
Plaintext
init()
{
brushes = GetEntArray( "sliding_brushes", "targetname" );
array_thread( brushes, ::move_brush );
}

move_brush()
{
original_origin = self.origin;
end_pos = GetEnt( self.target, "targetname" );
time = self.script_transition_time;
start_round = Int( self.script_noteworthy );
while( level.round_number < start_round )
{
wait 0.05;
}
self thread do_damage_to_players();
while( true )
{
self MoveTo( end_pos.origin, time );
self waittill( "movedone" );
self MoveTo( original_origin, time );
self waittill( "movedone" );
}
}

do_damage_to_players()
{
while( true )
{
players = GetPlayers();
for( i = 0; i < players.size; i ++ )
{
if( players[i] IsTouching( self ) )
{
players[i] do_damage( self );
}
}
wait 0.05;
}
}

do_damage( brush )
{
if( IsDefined( self.being_damaged_by_brush ) && self.being_damaged_by_brush )
{
return;
}
damage = Int( brush.script_string );
RadiusDamage( self.origin, 10, damage, damage );
self.being_damaged_by_brush = true;
wait Int( brush.script_flag );
self.being_damaged_by_brush = false;
}
Don't know if this is exactly what you want but you can play around with it. I don't feel like explaining how to use it, hopefully you can figure it out.
Last Edit: March 01, 2016, 04:46:10 am by alaurenc9

 
Loading ...