Amaurus
  • Amaurus
  • 100% (Exalted)
  • Major Topic Starter
17 years ago
i got this crazy idea that i could make a teleportation device! I think i know how to do it! ok first i guess i would make a box out of the area stuff and name it teleportation BOX. i would go into the scripts and make somthing like..
***SCRIPT***
***IF***
Unit(land or air) has entered area Teleportation BOX 
***THEN***
Unit is moved to area Teleportation box 2!
I thought that would work but the thing is when i looked for the unit(land or air) part, i couldnt find it! Could someone tell me if there is another way to make something like this? OR if there is a way i can fix this? Thanks!
Hey your base is on fire.
Sponsor
Drummin
17 years ago
I tried to do something like this before and couldn't find a way. The options are named units, which isn't realistic in a game situation. Then teams and object types which wouldn't identify the unit in the area. Also "Move" means like "drive" meaning the unit would go to the location as they normally would. The closest thing you can do is having a GLA tunnel that can be used by all units.
Amaurus
  • Amaurus
  • 100% (Exalted)
  • Major Topic Starter
17 years ago
awww i wanted this one to work alot:( now to go back to the drawing board!
Hey your base is on fire.
zombie_989
17 years ago
great news:

i've been working on scripting pads on which you would place units to transfer them to another player... it's long and tedious work, as one must write a new script for each type of unit. "if player0 has GT 0 unit or structure of type 'whatever' in area 'something or other' then spawn unnamed unit of type 'whatever' on team 'yourfavoriteteam here' at waypoint 'somewaypoint', (here, i run a subroutine to check for more than one, more than two, etc... as multiple units may enter. unfortunately, this causes a delay. if, however, i had several scripts enabled checking for specific numbers and spawning specific numbers, who knows if it would cause delay?) then, i change the altitude of water in the area to kill the units that entered (after i've spawned the correct number) and back, so more units may enter.

thing is, this transfers (spawns and kills the old) units for the same player to the pad at which the player starts (i've set it up so you can transfer units to yourself...) and you theoretically could set it up so that there are four transfer pads that spawn/kill on your team only to whatever pad you like... or (my new favorite idea, as it enables as few scripts as possible) one pad and four indestructible pillboxes which when selected or deselected enable or disable the scripts saying which pad or to which player you transfer...

it's all still in the works, but i've tested and found this scripting idea successful (transferred infantry units of the american type, as that's all i'd completed before deciding a test was in order to see if my work was a waste) i transferred a group of 9 infantry, but lost one, as i was using the greater than method instead of the equals to... and i stopped at four, as it's alot of scripting work.

the bad news is, you don't transfer the unit veterancy... i dunno if maybe you can test for this in the units entering the area and then spawn one of said level. also, the beginnings of the rudimentary idea for "transferring" units like this can be seen in my capture the flag map, where a hijacker who enters the "jail" area spawns two of them at waypoint1 and kills the one who entered the zone...

point of all this rambling is: units enter smaller "in" pad, spawn unnamed units on larger "out" pad at a waypoint and kill the "in" units. i'm working on more involved methods to exclude testing for units of factions that aren't in play, and to cut down on checks being run on what time, but the simple of it is: it works.
Drummin
17 years ago
I know this is a cool idea as I went though that same idea way back when. At the time I had imported the default AI scripts and was working on getting this to work for all factions and multiple players of the same faction. It gets very complicated not in detecting what units are on "pad_a" but in spawning the same units to the player on "pad_b". This is because you can use "" on the condition side of the script but you can't spawn to "". It has to be a named team. I eventually gave up because it got complicated and because I didn't think players would like loosing their veteran teams. I also didn't think I could get the AI player to recognize and use this way of travel.

However, for multiplayer only maps this might be fun. I had five pads in each base going to the other bases on a six-player map. Now that you've got spawning to player2 etc working for human-only players, this concept could work! The combination of all units, both in numbers and combinations though would be an impossible task to script, but if you get something figured out that would be cool.

If I were to attempt this now I would create teams of each unit type of say one through ten units each in the edit teams section. Then for the condition check, I'd run through a series of scripts that would activate the next condition check looking for one unit of typeX then two of typeX etc... then move on to the next unit type. At the end of these condition check scripts I'd have a delay timer that would allow enough time to clear the pad. When a condition matches the units in the area, it would activate the corresponding script to "Create an instance of teamX at waypointX" then continue running through the rest of the condition checks until it reached the end. This would happen very fast. SO, if say you had two Battlemaster tanks and one Gattling tank, the script for two Bmtanks and one Gtank would be activated and the two teams would be spawned. I.e. Two Battlemaster tanks and one Gattling tank. When the timer script is activated, the water would rise and take out the original units.
zombie_989
17 years ago
why not spawn unnamed units on the civilian team, and on the next line transfer all civilian assets to the command of playerX?

at first, i thought this might cause units spawned at the same time to both become the property of playerX, but i ran four scripts this way "simultaneously" and they all transferred the units they were supposed to to the player they were supposed to...

earlier today, i tried using this style of scripting on the capture the flag map. it seemed to work at first, but then i realized that it also transferred the flags... so now i'm working on a system to "retain" the flags for civilian without encroaching upon a "naturally owned" flag.

on the positive side, it works if you don't have civilian units you don't want transferred...

*update* create a player of the civilian faction with whatever name is convenient. now you can have civilian units and eat them, too.
beng
  • beng
  • 66.5% (Friendly)
  • Captain
17 years ago
My Laser Demo Nuke mod has a teleporting TARDIS for laser general:
http://www.cncmaps.com/index.php?showtopic=3409 

It can teleport anywhere on the map and your units can then come out of it. In essence it is like a sneak attack tunnel but it teleports based on the sci fi theory of teleportation, where the original object is deleted.

The Tardis does not have veterancy but if you want you can teleport things and preserve veterancy (see pilot OCL).
Users browsing this topic