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

Members Online

»
0 Active | 45 Guests
Online:

LATEST FORUM THREADS

»
CoD: Battle Royale
CoD+UO Map + Mod Releases
Damaged .pk3's
CoD Mapping
heli to attack ai
CoD4 SP Mapping

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 4
Category: CoD4 SP Mapping
CoD 4 mapping and level design for single player.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername, novemberdobby
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked subscribe
Author Topic: Removing manhole
infinet
General Member
Since: Feb 4, 2008
Posts: 208
Last: Jan 23, 2013
[view latest posts]
Level 4
Category: CoD4 SP Mapping
Posted: Sunday, Mar. 7, 2010 11:23 pm
Is there a good script that can remove a manhole. I was looking at the door tuts and it isnt really working for me. I want to be able to remove a manhole. Is there a script that does this? Basically pick the manhole up a bit and then put to the side. thx
Share |
9837265498
General Member
Since: Nov 6, 2009
Posts: 193
Last: Jan 23, 2012
[view latest posts]
Level 4
Category: CoD4 SP Mapping
Posted: Sunday, Mar. 20, 2011 02:48 pm
you could do something like...

Code:
manhole()
{
trig  = getentarray("cover_trig", "targetname");
for(i=0;i<trig.size;i++)
trig[i] thread cover_think();	
}

cover_think()
{
self.cover = getent(self.target, "targetname");
self.open = getent(self.cover.target, "targetname");

self waittill(trigger);

self.cover movez(2, 1, .25,  .15);
self.cover waittill( "movedone" );
self.cover moveto(self.open.origin, 2, .25 ,.15);
self.cover waittill("movedone");
}


this is a very simple and should work... of course i just through it together so look for syntax issues.

It is set up as an array script so you can have multiple sewer grates (i assumed you would enter and exit different ones)

in radiant, make your sewer grate 2units thick and flush with the ground, and this should lift it up and slide it to a script origin.

have a trig target the cover, which targets an origin and it should work.

Hopefully this helps , but being i am a little late you may have a gotten another fix by now.
Share |
DeekCiti
General Member
Since: Mar 13, 2008
Posts: 1293
Last: Jul 9, 2016
[view latest posts]
Level 8
Category: CoD4 SP Mapping
Posted: Sunday, Mar. 20, 2011 05:31 pm
Give this a try.

Code:
main()
{
	thread  manHole();
}

manHole()
{
	trig = getEnt ( "NAME HERE", "targetname" );
	manHole = getEnt ( "NAME HERE", "targetname" );
	
	while(1)
	{
		trig waittill ( "trigger" );
		trig delete();
		manHole moveZ ( 4, 1, 0.5, 0.5 );		//move the manhole up (distance, speed, accel, decel)
		manHole waittill ( "movedone" );		
		manHole rotateYaw ( 180, 1, 0.5, 0.5 );		//(distance, speed, accel, decel)(X = rotateRoll, Y = rotatePitch, Z = rotateYaw)
		manHole waittill ( "rotatedone" );
	}
}



Just remember:
The trigger and the manhole have different targetnames.
The trigger is NOT connected to the manhole.
The manhole has an origin (texture) on one of it's edges, so it has a hinge, and knows what point to rotate from.
The origin is part of your script_brushmodel family for the manhole.



edited on Mar. 20, 2011 01:33 pm by DeekCiti

Nevermind, this is OLD.
Share |
Restricted Access Topic is Locked subscribe
MODSonline.com Forums : Call of Duty 4 : CoD4 SP Mapping

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

»