Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds

Members Online

»
0 Active | 13 Guests
Online:

LATEST FORUM THREADS

»
warfare
CoD4 Map + Mod Releases
Voting menu on maps
CoD+UO General
Hauling 911
CoDBO3 General

Forums

»

Welcome to the MODSonline.com forums. Looking for Frequently Asked Questions? Check out our FAQs section or search it out using the SEARCH link below. If you are new here, you may want to check out our rules and this great user's guide to the forums and the website.
For more mapping and modding information, see our Wiki: MODSonWiki.com

Jump To:
Forum: All Forums : Call of Duty 2
Category: CoD2 Scripting
Scripting and coding with Call of Duty 2.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked
Page
Previous Page Next Page
subscribe
Author Topic: collision map for mp
BraX
General Member
Since: Apr 29, 2008
Posts: 413
Last: May 26, 2012
[view latest posts]
Level 5
Im a fan of MODSonair
Category: CoD2 Scripting
Posted: Monday, Nov. 29, 2010 10:14 am
Create script_brushmodel and give it key "targetname" with value "tank_brush", then make script_model and set targetname to "tank".
Now copy this into script:
Code:
brushModel = getEnt( "tank_brush", "targetname" );
tankModel = getEnt( "tank", "targetname" );
brushModel linkTo( tankModel );


Recompile map and see changes :) Collision will be attached to script_model.
Share |
zeroy
General Member
Since: Nov 26, 2007
Posts: 1060
Last: Mar 12, 2014
[view latest posts]
Level 8
Category: CoD2 Scripting
Posted: Monday, Nov. 29, 2010 11:31 am
BraX writes...
Quote:
Create script_brushmodel and give it key "targetname" with value "tank_brush", then make script_model and set targetname to "tank".
Now copy this into script:
Code:
brushModel = getEnt( "tank_brush", "targetname" );
tankModel = getEnt( "tank", "targetname" );
brushModel linkTo( tankModel );


Recompile map and see changes :) Collision will be attached to script_model.


Very good solution indeed! I got confused earlier with the COD4 comment as i though there was no access to the map!
Share |
Leal
General Member
Since: Feb 5, 2010
Posts: 196
Last: Aug 18, 2013
[view latest posts]
Level 4
Category: CoD2 Scripting
Posted: Monday, Nov. 29, 2010 03:06 pm
If I use the linkto function the player dont stay at the clips, the clips move with the xmodel but the players stays at the position and falls on the ground. Why?
Share |
clanhelio
General Member
Since: Aug 30, 2008
Posts: 223
Last: Mar 24, 2011
[view latest posts]
Level 4
Category: CoD2 Scripting
Posted: Monday, Nov. 29, 2010 07:55 pm
linktos seem to disregard the player. Makes sense, but it is troublesome. Try not linking to, but just moving it in conjunction with the xmodel?
Share |
Leal
General Member
Since: Feb 5, 2010
Posts: 196
Last: Aug 18, 2013
[view latest posts]
Level 4
Category: CoD2 Scripting
Posted: Monday, Nov. 29, 2010 08:46 pm
Yes then it works like I show in the video:
http://www.xfire.com/video/3bd1d1/

But its very instable if you look at the video (the player moves back a little back, if you touch the clips then there is this moving sensation of the clips), is it possible to use an other way of making this and maybe avoiding it?

P.D.: To fix the linkto, is there any way of linking the player to the movement of the brushes?

edited on Nov. 29, 2010 04:38 pm by Leal
Share |
clanhelio
General Member
Since: Aug 30, 2008
Posts: 223
Last: Mar 24, 2011
[view latest posts]
Level 4
Category: CoD2 Scripting
Posted: Tuesday, Nov. 30, 2010 10:30 am
Moving back? Like is something actually pushing you back and you can't go forward? Are you sure both the clip and xmodel are moving at the same time? My guess is the clip is lagging behind a bit.
Share |
Leal
General Member
Since: Feb 5, 2010
Posts: 196
Last: Aug 18, 2013
[view latest posts]
Level 4
Category: CoD2 Scripting
Posted: Tuesday, Nov. 30, 2010 01:42 pm
Yes, xmodel and clips move, and you fall down. There is no lag and nothing, I tryed it with and without linkto, and without using link you dont fall down.

Is there a possibility to link the player to the xmodel and clips, too?
Share |
BraX
General Member
Since: Apr 29, 2008
Posts: 413
Last: May 26, 2012
[view latest posts]
Level 5
Im a fan of MODSonair
Category: CoD2 Scripting
Posted: Tuesday, Nov. 30, 2010 03:47 pm
If brushmodel isn't solid try this:

Code:
brush setContents( 1 );
brush solid();

Otherwise try using diferent material on brush because some are non-solid.

Notice! Don't move clip too fast because it will move strange (multiplayer is 20 frames per second...) so i suggest you to use low move speed.
Share |
Leal
General Member
Since: Feb 5, 2010
Posts: 196
Last: Aug 18, 2013
[view latest posts]
Level 4
Category: CoD2 Scripting
Posted: Tuesday, Nov. 30, 2010 04:35 pm
The brush is solid, but you dont keep on it, it moves awat while you stay at the same postion, thats why you fall down.
Share |
clanhelio
General Member
Since: Aug 30, 2008
Posts: 223
Last: Mar 24, 2011
[view latest posts]
Level 4
Category: CoD2 Scripting
Posted: Tuesday, Nov. 30, 2010 08:41 pm
But is it when using linkto?
You shouldn't have this problem if just don't link it, and just move it at the exact same time as the model.
Share |
Restricted Access Topic is Locked
Page
Previous Page Next Page
subscribe
MODSonline.com Forums : Call of Duty 2 : CoD2 Scripting

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»