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

Members Online

»
0 Active | 12 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
Next Page
subscribe
Author Topic: HIDE, SHOW... = (
wsa.miller
General Member
Since: May 26, 2006
Posts: 51
Last: Oct 25, 2007
[view latest posts]
Level 3
Category: CoD2 Scripting
Posted: Sunday, May. 27, 2007 11:31 pm
Ok I created a clip for a animation in my map, that clip hides during 20 seconds and later, that clips show in the map, the problem is this:

When the clip hidden I can touch it, I use

targetname hide();
targetname show();

Whats code can I uses?
Share |
sevensniff
General Member
Since: Feb 12, 2005
Posts: 365
Last: Apr 8, 2010
[view latest posts]
Level 5
Category: CoD2 Scripting
Posted: Sunday, May. 27, 2007 11:50 pm
the game must be thinking it is still there. this bug happens in sp to were u have a clip and it dissapears but the ai still think its there

what u can do is spawn the clip away from that are that want it then on the map load it moves to that position. then it hides whe u need it too
Share |
WHC_Grassy
General Member
Since: Apr 20, 2005
Posts: 1426
Last: Aug 25, 2007
[view latest posts]
Level 8
Category: CoD2 Scripting
Posted: Monday, May. 28, 2007 12:41 am
You can use the origin change method.

Code:

triggerOff()
{
	if (!isdefined (self.realOrigin))
		self.realOrigin = self.origin;

	if (self.origin == self.realorigin)
		self.origin += (0, 0, -10000);
}

triggerOn()
{
	if (isDefined (self.realOrigin) )
		self.origin = self.realOrigin;
}


Regards Grassy
Share |
sevensniff
General Member
Since: Feb 12, 2005
Posts: 365
Last: Apr 8, 2010
[view latest posts]
Level 5
Category: CoD2 Scripting
Posted: Monday, May. 28, 2007 12:54 am
that was gonna be my second option of the other one didnt work :D
Share |
wsa.miller
General Member
Since: May 26, 2006
Posts: 51
Last: Oct 25, 2007
[view latest posts]
Level 3
Category: CoD2 Scripting
Posted: Monday, May. 28, 2007 05:24 pm
Thaks people, but I prefer animate the clip
Hey look in the projects my map, his name is FRENCH_VILLAGE [drink]
Share |
WHC_Grassy
General Member
Since: Apr 20, 2005
Posts: 1426
Last: Aug 25, 2007
[view latest posts]
Level 8
Category: CoD2 Scripting
Posted: Tuesday, May. 29, 2007 06:32 am
I think you misunderstood our reply.

You said you wanted to hide / show the clip.

The method I explained will DO exactly the same thing.
You dont see it move from one spot to the next because it's an origin change.

Please explain your meaning of "animate the clip" [confused]
Share |
wsa.miller
General Member
Since: May 26, 2006
Posts: 51
Last: Oct 25, 2007
[view latest posts]
Level 3
Category: CoD2 Scripting
Posted: Tuesday, May. 29, 2007 09:32 pm
Because when I make a clip with "hide" and "show" in the script, I can touch the clip when this was in "hide", then, I wanted animate the clip for what that doesn´t happen.

But I find the solution, I will not do that. [thumbs_up]
Share |
WHC_Grassy
General Member
Since: Apr 20, 2005
Posts: 1426
Last: Aug 25, 2007
[view latest posts]
Level 8
Category: CoD2 Scripting
Posted: Friday, Jun. 1, 2007 01:46 pm
Suite yourself, if you dont want to listen to advice then fine.

You were given an alternative but you can't seem to get over the hide() show() thing. You cant collide with a clip if it's not in the map by moving it as I suggested to you. [duh]

Grassy
Share |
Pedro699
General Member
Since: Jun 19, 2006
Posts: 781
Last: Dec 18, 2010
[view latest posts]
Level 7
Category: CoD2 Scripting
Posted: Friday, Jun. 1, 2007 05:41 pm
If by clip you mean a player clip brush, the hide() show() commands won't work, because it is already invisible.

You need to use the

targetname solid();

and

targetname notsolid();

commands instead.
Share |
wsa.miller
General Member
Since: May 26, 2006
Posts: 51
Last: Oct 25, 2007
[view latest posts]
Level 3
Category: CoD2 Scripting
Posted: Friday, Jun. 1, 2007 07:54 pm
I solutionated the problen whit other thing, but thanks for the code!, now is more easy, Thacks pedro! where are you from?
Share |
Restricted Access Topic is Locked
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

»