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

attach clipping to vehicle

broken avatar :(
Created 12 years ago
by jjbradman
0 Members and 1 Guest are viewing this topic.
4,352 views
broken avatar :(
×
broken avatar :(
drago
Location: mx
Date Registered: 5 July 2013
Last active: 6 years ago
Posts
941
Respect
Forum Rank
The Decider
Primary Group
Member
My Contact & Social Links
More
×
jjbradman's Groups
jjbradman's Contact & Social Linksjjbradmanjjbradmanjjbradman
ok im using ugx airstrike tutorial to make an helicopter travel, the problem is that i want the player to move free inside the heli, but i cant get the clipping brushes to get attatched to the heli. thanks if someone can help me :)
This topic contains a post which is marked as the Best Answer. Click here to view it.
broken avatar :(
×
broken avatar :(
Location: se
Date Registered: 30 July 2013
Last active: 2 years ago
Posts
517
Respect
Forum Rank
Zombie Enslaver
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
×
Ege115's Groups
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Ege115's Contact & Social LinksEge115
Just an idea what I would test in this situation.

Maybe place the clips at the places were you want them to be on the heli, and then make the clips move at the same directions as the helicopter does.
I don't know how your script look for that like but if you just make the clips having the same movements as the helicopter has in the script.

What I explained now do not make the clips attached to the helicopter but the clips will follow the helicopter and make the same movements and will move at the same directions and will still stay at the exact same places were you placed the clips on the helicopter while it moves all the time.

broken avatar :(
×
broken avatar :(
Location: be
Date Registered: 17 August 2013
Last active: 5 years ago
Posts
369
Respect
Forum Rank
Perk Hacker
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
Web & Software Developer and Designer
Signature
"Deleted code is debugged code." - Jeff Sickel
"Mathematicians stand on each others' shoulders and computer scientists stand on each others' toes." - Richard Hamming
×
JR-Imagine's Groups
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Since the clips are doing the same movement as your helicopter, use this:
Code Snippet
Plaintext
heli= getEnt("heli","targetname");
heli_clip= getEnt("heli_clip","targetname");

heli_clip enablelinkto();
heli_clip linkto (heli);
Last Edit: December 14, 2013, 10:44:21 pm by JR-Imagine
broken avatar :(
×
broken avatar :(
Former UGX Lead Asset Creator
Location: ca
Date Registered: 17 August 2012
Last active: 7 years ago
Posts
1,932
Respect
Forum Rank
Zombie Destroyer
Primary Group
UGX V.I.P.
My Groups
More
My Contact & Social Links
More
Personal Quote
Eh?
Signature

(Click to enter portfolio)
×
SajeOne's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
UGX V.I.P.
UGX V.I.P.
The easiest way would just be to create a collmap for the model so that it naturally has collision when placed into the game. No need for linking clips to it.
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 16 June 2013
Last active: 4 years ago
Posts
1,005
Respect
Forum Rank
Zombie Colossus
Primary Group
Mapper
My Groups
More
My Contact & Social Links
More
Signature
Hey if you had tons of fun on playing my maps please DONATE :)

play ESTATE now, and claim your mansion back from the undead!
×
jei9363's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Mapper Has released one or more maps to the UGX-Mods community.
jei9363's Contact & Social Linksjayingardiajei9363jei9363
if you are using more than 1 clip

helicopter = getEnt("helicopter", "targetname"); // your helicopter

helicopter_clips = getEntArray("heli_clips", "targetname"); //your clips

helicopter_clips arrayLinkTo(helicopter); //link all yo clips


//method

arrayLinkTo(linking_object)
{
   for(k=0;k<self.size;k++)
      {
          self[k] linkTo(linking_object);
      }
}
Last Edit: December 15, 2013, 12:59:10 am by jei9363
broken avatar :(
×
broken avatar :(
drago
Location: mx
Date Registered: 5 July 2013
Last active: 6 years ago
Posts
941
Respect
Forum Rank
The Decider
Primary Group
Member
My Contact & Social Links
More
×
jjbradman's Groups
jjbradman's Contact & Social Linksjjbradmanjjbradmanjjbradman
The easiest way would just be to create a collmap for the model so that it naturally has collision when placed into the game. No need for linking clips to it.

it has a collmap o.o but when i make my vehicle a script_vehicle it just ignores the collmap for some reason .-.

Post Merge: December 15, 2013, 06:30:58 am
if you are using more than 1 clip

helicopter = getEnt("helicopter", "targetname"); // your helicopter

helicopter_clips = getEntArray("heli_clips", "targetname"); //your clips

helicopter_clips arrayLinkTo(helicopter); //link all yo clips


//method

arrayLinkTo(linking_object)
{
   for(k=0;k<self.size;k++)
      {
          self[k] linkTo(linking_object);
      }
}

thanks man i'll try this after after i'll remake all my map from scratch :D
Last Edit: December 15, 2013, 06:30:58 am by jjbradman
broken avatar :(
×
broken avatar :(
Former UGX Lead Asset Creator
Location: ca
Date Registered: 17 August 2012
Last active: 7 years ago
Posts
1,932
Respect
Forum Rank
Zombie Destroyer
Primary Group
UGX V.I.P.
My Groups
More
My Contact & Social Links
More
Personal Quote
Eh?
×
SajeOne's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
UGX V.I.P.
UGX V.I.P.
it has a collmap o.o but when i make my vehicle a script_vehicle it just ignores the collmap for some reason .-.
Derp, sorry doesn't work on script models. >__<
broken avatar :(
×
broken avatar :(
[UGX] Founder
Location: usBay Area, California
Date Registered: 24 June 2011
Last active: 3 years ago
Posts
5,544
Respect
6,646Add +1
Forum Rank
Immortal
Primary Group
UGX Administrator
My Groups
More
My Contact & Social Links
More
Signature
If Java had true garbage collection, most programs would delete themselves upon execution.
×
treminaor's Groups
UGX Administrator
UGX Team Member
UGX Site Moderator Has the ability to issue warnings to users, edit and remove posts from the forum and to move topics to other boards. Upholds the rules of the forum. Moderates Chat Rooms.
If the helicopter is a script model, which it should be, create two script brushmodels with the clip texture and in your script, use code similar to:

Code Snippet
Plaintext
clip1 LinkTo(helicopter);
clip2 LinkTo(helicopter);

The clips and anything else you link to the helicopter will move with the helicopter. I can tell you right now that allowing the player to walk around in a horizontally-moving object is going to be glitchy as hell, which is why players' movement is always locked while in vehicles. The player will most likely glitch out of the helicopter entirely.

The other approach would be to edit the helicopter model in Maya and add some clear-textured doors to the sides of the helicopter which are invisible but still block the player.
broken avatar :(
×
broken avatar :(
drago
Location: mx
Date Registered: 5 July 2013
Last active: 6 years ago
Posts
941
Respect
Forum Rank
The Decider
Primary Group
Member
My Contact & Social Links
More
×
jjbradman's Groups
jjbradman's Contact & Social Linksjjbradmanjjbradmanjjbradman

The clips and anything else you link to the helicopter will move with the helicopter. I can tell you right now that allowing the player to walk around in a horizontally-moving object is going to be glitchy as hell, which is why players' movement is always locked while in vehicles. The player will most likely glitch out of the helicopter entirely.

The other approach would be to edit the helicopter model in Maya and add some clear-textured doors to the sides of the helicopter which are invisible but still block the player.
thanks for the advice trem :oo i might have to lock player movement while in midair :(
Marked as best answer by jjbradman 12 years ago
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 16 June 2013
Last active: 4 years ago
Posts
1,005
Respect
Forum Rank
Zombie Colossus
Primary Group
Mapper
My Groups
More
My Contact & Social Links
More
×
jei9363's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Mapper Has released one or more maps to the UGX-Mods community.
jei9363's Contact & Social Linksjayingardiajei9363jei9363
Add 4 script structs to the helicopter for 4 potential players

when the event begins test for players in a 64 - 128 unit radius

level.heli_player_grab_radius = 64; //radius for which the helicopter will grab players

players = get_players(); //get active players

helicopter_player_struct = getEntArray("helicopter_player_struct", "targetname"); //get player points

for(i = 0; i < players.size; i++)
{
   if(distance(player.origin,helicopter_player_struct.origin) < level.heli_player_grab_radius) //players in range?
   player playerLinkTo(helicopter_player_struct); //yes? link them
}

*there should also be a test for players in last stand
Last Edit: December 15, 2013, 07:26:30 pm by jei9363
broken avatar :(
×
broken avatar :(
drago
Location: mx
Date Registered: 5 July 2013
Last active: 6 years ago
Posts
941
Respect
Forum Rank
The Decider
Primary Group
Member
My Contact & Social Links
More
×
jjbradman's Groups
jjbradman's Contact & Social Linksjjbradmanjjbradmanjjbradman
wow thanks for the help man :D you'll be in my map credits list if i manage to release it one day xD
broken avatar :(
  • DeletedUser
  • Deleted Member
×
broken avatar :(
DeletedUser
This user is deleted :(
If you want the players to also be able to get out of the heli then add a trigger use that when triggered it unlinks the player.

 
Loading ...