Always fly?

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Locked
User avatar
leileilol
Posts: 4449
Joined: Sun May 30, 2004 10:16 am
Preferred Pronouns: She/Her
Location: GNU/Hell

Always fly?

Post by leileilol »

Supposed if I were to continue with this project
Image

How would the player beable to fly at any given time?
User avatar
Bio Hazard
Posts: 4019
Joined: Fri Aug 15, 2003 8:15 pm
Location: ferret ~/C/ZDL $
Contact:

Post by Bio Hazard »

setplayerproperty(1,1,PROP_FLY);
User avatar
Galaxy_Stranger
Posts: 1326
Joined: Sat Aug 16, 2003 11:42 pm
Location: Shropshire
Contact:

Post by Galaxy_Stranger »

Yeah, you can script it, but you'd want to bind it to a keystroke. In order to do that seamlessly without the player having to type it in, you'd want to put it into the autoexec.cfg. You can either script it, or you could also bind FLY via the autoexec.cfg as well.
User avatar
LilWhiteMouse
Posts: 2270
Joined: Tue Jul 15, 2003 7:00 pm
Location: Maine, US
Contact:

Post by LilWhiteMouse »

Galaxy_Stranger wrote:In order to do that seamlessly without the player having to type it in, you'd want to put it into the autoexec.cfg.
Or use KEYCONF. From one of my abandoned projects:

Code: Select all

weaponsection SWOTE

alias Varitech_TIE "+forward;+moveleft;+moveright;puke 1 1;rebind Varitech_Walker"
alias Varitech_Walker "-forward;-moveleft;-moveright;puke 1 2;rebind Varitech_TIE"

defaultbind "t" "Varitech_Walker"
 
addkeysection "SWOTE" SWOTE
addmenukey "Transform TIE/Walker" Varitech_TIE
And the scripts:

Code: Select all

script 1 (int Mode) {
Thing_ChangeTID (0, 255);
if (TIEMode == 0 & Mode == 1)
	{
	print (s:"Varitech startup failure.  Attempt restart.");
	Terminate;
	}

SetPlayerProperty (1, Off, PROP_TotallyFrozen);
if (Mode == 2)
	{
//TIE Walker
TIEMode = 1;
	}
if (Mode == 1)
	{
//TIE Fighter
TIEMode = -1;
	}
}

script 2 ENTER {
print (s:"Transform to launch");
Thing_ChangeTID (0, 255);
SetPlayerProperty (1, On, PROP_TotallyFrozen);
SetHudSize (320, 240, 1);
SetFont ("TIE");
hudmessage (s:"A";0,100,-1,160.0,120.0,0.0);
SetHudSize (0, 0, 0);
SetFont ("Trans5");
hudmessage (s:"A";0,99,-1,0.0,0.0,0.0);
GiveInventory ("Cell", 300);
GiveInventory ("BlueArmor", 1);
TakeInventory ("Armor", 100);
while (1) 
	{
	if (CheckInventory("Cell") < 300 & TIEMode == 1)
		{GiveInventory("Cell", 4);}
		else
		{GiveInventory("Cell", 2);}
        if (CheckInventory("Armor") < 100 & CheckInventory("Cell") > 1)
		{
		TakeInventory("Cell", 2);
                Giveinventory("ArmorBonus", 1);                
		}
        While (CheckInventory ("Armor") > 100)
                {
                TakeInventory ("Armor", 1);
                }
	delay (const:35);
	}
}

script 3 ENTER {
int t;
while (TIEMode == 0){delay (const:35);}
Floor_RaiseToNearest (1, 32);
while (1)
{
//Animate to Walker
SetPlayerProperty (1, Off, PROP_FLY);
SetPlayerProperty (1, Off, PROP_INSTANTWEAPONSWITCH);
SetActorProperty (0, APROP_Speed, 0.75);
GiveInventory ("Pistol", 999);
SetWeapon ("Pistol");
TakeInventory ("BFG9000", 999);
for (t = 0;t < 5;t++)
	{
SetFont (TransAnim[t]);
hudmessage (s:"A";0,99,-1,0.0,0.0,0.0);
delay (const:12);
	}
while (TIEMode == 1){delay (const:16);}

//Animate to Fighter
SetPlayerProperty (1, On, PROP_FLY);
SetPlayerProperty (1, On, PROP_INSTANTWEAPONSWITCH);
SetActorProperty (0, APROP_Speed, 1.5);
GiveInventory ("BFG9000", 999);
SetWeapon ("RocketLauncher");
TakeInventory ("Pistol", 999);
for (t = 4;t >= 0;t--)
	{
SetFont (TransAnim[t]);
hudmessage (s:"A";0,99,-1,0.0,0.0,0.0);
delay (const:12);
	}
if (NoFlyZone == 1){ACS_Execute (4, 0);}
while (TIEMode == -1){delay (const:16);}

}
}

script 4 (void) {
if (TIEMode == -1)
        {
        if (NoFlyZone == 1)
                {DamageThing (255);}
                else
                {DamageThing (15);}
        }
}

script 5 (void) {
if (LineSide() == SIDE_FRONT){NoFlyZone = 1;ACS_Execute(4, 0);}
if (LineSide() == SIDE_BACK){NoFlyZone = 0;}
}
Bit comlicated, but I'm not awake enough to hack it down.

http://home.midmaine.com/~lilwhitemo/DOOM0002.png
http://home.midmaine.com/~lilwhitemo/DOOM0003.png
User avatar
Cutmanmike
Posts: 11353
Joined: Mon Oct 06, 2003 3:41 pm
Operating System Version (Optional): Windows 10
Location: United Kingdom
Contact:

Post by Cutmanmike »

Woah... That looks great, and you abandoned it? :cry:

Anyway about the fly thing, it won't be any use if he expects it to work with any level (like a TC)
User avatar
TheDarkArchon
Posts: 7656
Joined: Sat Aug 07, 2004 5:14 am
Location: Some cold place

Post by TheDarkArchon »

I'm guessing that the scripts and KEYCONF was for Chibi Rebellion.
User avatar
LilWhiteMouse
Posts: 2270
Joined: Tue Jul 15, 2003 7:00 pm
Location: Maine, US
Contact:

Post by LilWhiteMouse »

TheDarkArchon wrote:I'm guessing that the scripts and KEYCONF was for Chibi Rebellion.
No. An out-of-reach project entitled Secret weapons of the Empire, an excuse to use my Star Wars models. You'd play a Rodian agent sent to infiltrate (not assault) a R&D facility, and steal a TIE Varitech. Firefox/RotJ's Endor mix if you wish. I quickly realized that it was beyond my mapping ability though, so I dropped it before it got anywhere. The screenshot was from a simple test map I did to do the technical stuff.

http://home.midmaine.com/~lilwhitemo/SWOTE.JPG
User avatar
Tormentor667
Posts: 13555
Joined: Wed Jul 16, 2003 3:52 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia (Modern GZDoom)
Location: Germany
Contact:

Post by Tormentor667 »

@LilWhiteMouse - Damn... this is sad without any doubt, because the stuff you did looks interesting and useful :)
User avatar
Galaxy_Stranger
Posts: 1326
Joined: Sat Aug 16, 2003 11:42 pm
Location: Shropshire
Contact:

asdjf;alskjdf

Post by Galaxy_Stranger »

Ok.

You owe me one new pair of underwear...

EXTREMELY interesting idea. I had no idea any SW fans thought about transformable mecha. What's the game play like?

I'm gonna sift through all that scripting to see what I can steal.
User avatar
leileilol
Posts: 4449
Joined: Sun May 30, 2004 10:16 am
Preferred Pronouns: She/Her
Location: GNU/Hell

Post by leileilol »

Well, my wad was about some garg lost in a time/dimensional rift done by some evil magician then. He suddenly appeared at E1M1/MAP01 and he must survive

Some storyline eh? :P

It'd be cool to have wing stamina like Gargoyle's Quest II while i'm at it (i.e. only fly for a short while at a time, then you must land to quickly recharge this stamina)
Locked

Return to “Editing (Archive)”