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

Members Online

»
0 Active | 61 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
Category: CoDUO Mapping
CoD United Offensive mapping and level design.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked subscribe
Author Topic: Teleport vehicle whilst on it
anoosMonkey
General Member
Since: Jan 7, 2007
Posts: 20
Last: Apr 29, 2008
[view latest posts]
Level 1
Category: CoDUO Mapping
Posted: Saturday, Aug. 25, 2007 12:45 pm
I've made a small map with a jeep, a short straight road and a teleport ( An almost working teleport ). So that when you've driven to the end of the road you get teleported back to the beginning and keep on driving forward, like an infinite loop.

The problem is I can't seem to get the vehicle teleported, at all, only when you step out of the vehicle you get teleported back leaving the jeep still there. So my question is: How do i get the jeep teleported back, when the player is still in it?

I'm quite new at scripting and I've done everything that I could think of. Any help would be appreciated :)

Sorry if there is a topic like this, searched but couldn't find.
Share |
|DA|DarkDilbert
General Member
Since: Jun 5, 2006
Posts: 675
Last: Apr 29, 2008
[view latest posts]
Level 6
Category: CoDUO Mapping
Posted: Saturday, Aug. 25, 2007 01:05 pm
i've been having this problem too. I haven't found a way round it yet - script_vehicles don't work with move, teleport or movegravity, and can't be linked to entities that can use those functions - it gives you the error if you run the map in developer 1 mode. They don't move if you have a moving script_brushmodel underneath them either, wish annoyed me as i wanted to make a vehicle lift

The strange thing is if you give the vehicle a targetname, and link a script_brushmodel to it , moving and rotating only that script_brushmodel in the gsc, aswell as using this function

trackpos(model)

{
while(1)
{
self.origin = model.origin;
self.angles = model.angles;
wait(0.1);
}
}

the vehicle won't follow the origin of the brushmodel, but it will follow the angle of it, despite that fact linking it isn't supposed to work. So there might be a way around it
Share |
|DA|DarkDilbert
General Member
Since: Jun 5, 2006
Posts: 675
Last: Apr 29, 2008
[view latest posts]
Level 6
Category: CoDUO Mapping
Posted: Saturday, Aug. 25, 2007 01:17 pm
Code:

main()
{
  thread carmove();

}

carmove()
{
	

  car = getent("jeep01", "targetname");
  scriptbrush = getent("block","targetname");

	wait(5.0);
	while(1)
  	{
		
		wait(5.0);
		scriptbrush rotateYaw (360, 10, 0, 0);
		scriptbrush waittill ("rotatedone");
	}

car thread trackpos(scriptbrush);

}

trackpos(model)

{
  while(1)
  {
    self.origin = model.origin;
    self.angles = model.angles;
    wait(0.1);
  }
}


jeep01 being the targetname for the vehicle in the editor
and block being the script_brushmodel's targetname
Share |
anoosMonkey
General Member
Since: Jan 7, 2007
Posts: 20
Last: Apr 29, 2008
[view latest posts]
Level 1
Category: CoDUO Mapping
Posted: Saturday, Aug. 25, 2007 04:16 pm
Quote:
main()
{
thread carmove();

}

carmove()
{


car = getent("jeep01", "targetname");
scriptbrush = getent("block","targetname");

wait(5.0);
while(1)
{

wait(5.0);
scriptbrush rotateYaw (360, 10, 0, 0);
scriptbrush waittill ("rotatedone");
}

car thread trackpos(scriptbrush);

}

trackpos(model)

{
while(1)
{
self.origin = model.origin;
self.angles = model.angles;
wait(0.1);
}
}

jeep01 being the targetname for the vehicle in the editor
and block being the script_brushmodel's targetname


Thanks for the help, but are you sure you understood my problem? I want to be able to drive the vehicle through a teleporter and keep on going when i've been teleported? I used your code, but it didn't work... I think... [thumbs_up]

edited on Aug. 25, 2007 12:18 pm by CoDJohan
Share |
|DA|DarkDilbert
General Member
Since: Jun 5, 2006
Posts: 675
Last: Apr 29, 2008
[view latest posts]
Level 6
Category: CoDUO Mapping
Posted: Saturday, Aug. 25, 2007 04:57 pm
Yeah i know what you mean. That code is just an example of the only method that works for moving a jeep in some way. I have no idea how it can be adapted to make a teleporter work, but it might be a start
Share |
anoosMonkey
General Member
Since: Jan 7, 2007
Posts: 20
Last: Apr 29, 2008
[view latest posts]
Level 1
Category: CoDUO Mapping
Posted: Saturday, Aug. 25, 2007 05:27 pm
Aaah, i see. Will this move a usable vehicle or a model?
Share |
|DA|DarkDilbert
General Member
Since: Jun 5, 2006
Posts: 675
Last: Apr 29, 2008
[view latest posts]
Level 6
Category: CoDUO Mapping
Posted: Saturday, Aug. 25, 2007 05:38 pm
that's what i don't get. the jeep should move along following the script_brushmodel/block wherever it goes, but it doesn't - however it does change it's angle to that of the block as it rotates. That's as far as i got before giving up
Share |
WHC_Grassy
General Member
Since: Apr 20, 2005
Posts: 1426
Last: Aug 25, 2007
[view latest posts]
Level 8
Category: CoDUO Mapping
Posted: Saturday, Aug. 25, 2007 10:49 pm
Moving or changing the origins of script_vehicles is not supported in UO. I have tried all ways I know of to relocate a vehicle in a completed map via scripts and all errors I got reported "function not supported for this entity" or similar.
Share |
.KiLL3R.
General Member
Since: Oct 26, 2006
Posts: 1437
Last: Jul 3, 2017
[view latest posts]
Level 8
Category: CoDUO Mapping
Posted: Saturday, Aug. 25, 2007 11:44 pm
maybe som edits to the _jeepdrive_gmi script... stuff like self.spawn_origin = self.origin; maybe change for were u want it to spawn and other stuff:

dupe = self spawnduplicate();
dupe.spawn_count = self.spawn_count;
dupe.spawn_origin = dupe.origin;

self unlinkfromworld();

self linkintoworld();

maybe wen the vehicle touches the trigger with the driver its unlinkfromworld() and self.spawn_origin set to were u want it to apear
Share |
Restricted Access Topic is Locked subscribe
MODSonline.com Forums : Call of Duty : CoDUO 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

»