Icon of Sin / Baphomet
Register | User Profile | Member List | F.A.Q | Privacy Policy | New Blog | Search Forums | Forums Home
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Doom Editing > LAN game ENTER script problem
 
Author
All times are GMT. The time now is 23:20. Post New Thread    Post A Reply
Unholypimpin
Member


Posts: 443
Registered: 03-11


So basically I have a script that gives a brief explanation of what class the player is playing. The script works offline but if someone plays a LAN game with a friend then the script treats both players as 1 and gives both players an explanation for both classes their playing rather than each player getting a separate message only for their class.

Basically I want the script check only 1 players inventory at a time and gives them a message depending on the class their playing, rather than the script checking both inventories at the same time then playing a script to both players as if they are playing as 2 classes at once.


Here is the script, if anyone could help me out I would be very grateful.
Spoiler:
script 28 ENTER
{
Fadeto(0,0,0,1.0,0.001);
if (CheckInventory("IAMNECRO") == 1)
{
Thing_Move (0, 49,1);
delay(15);
acs_execute(29,0,0,0,0);
}
if (CheckInventory("IAMCLERIC") == 1)
{
Thing_Move (0, 58,1);
SetFont("BIGFONT");
HudMessage(s:"As A cleric you can cast searing light every 20 seconds which increases your weapon damage and heals you.";
HUDMSG_FADEOUT, 1, CR_RED, 0.5, 0.4, 8.0);
delay(250);
}
if (CheckInventory("IAMMAGE") == 1)
{
Thing_Move (0, 60,1);
SetFont("BIGFONT");
HudMessage(s:"As A Mage you gain 1 blue mana every 10 seconds, this effect lasts forever.";
HUDMSG_FADEOUT, 1, CR_RED, 0.5, 0.4, 8.0);
delay(250);
}
if (CheckInventory("IAMFIGHTER") == 1)
{
Thing_Move (0, 59,1);
SetFont("BIGFONT");
HudMessage(s:"As A Fighter you regenerate 1 health every 10 seconds, this effect lasts forever.";
HUDMSG_FADEOUT, 1, CR_RED, 0.5, 0.4, 8.0);
delay(250);
}
delay(15);
Fadeto(0,0,0,0.0,1.0);

}


script 29 (void)
{
delay(65);
Fadeto(0,0,0,0.7,0.001);
SetFont("BIGFONT");
HudMessage(s:"Necromancers can use their secondary attack to summon minions.";
HUDMSG_FADEOUT, 1, CR_RED, 0.5, 0.4, 8.0);
delay(250);
HudMessage(s:"All necromancer weapons can summon minions but cost health to summon them.";
HUDMSG_FADEOUT, 1, CR_RED, 0.5, 0.4, 8.0);
delay(250);
HudMessage(s:"Necromancer minions last about 1 minute before dying.";
HUDMSG_FADEOUT, 1, CR_RED, 0.5, 0.4, 7.0);
delay(220);
HudMessage(s:"Necromancers gain 4 health whenever they kill a monster but minions give no health.";
HUDMSG_FADEOUT, 1, CR_RED, 0.5, 0.4, 8.0);
delay(250);
Fadeto(0,0,0,0.0,1.0);
}

Old Post 06-23-13 05:57 #
Unholypimpin is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit || Quote
Cat God25
Mini-Member


Posts: 55
Registered: 04-09


Unless a player somehow manages to obtain two of the 'IAMCLASS' items, i don't see why the script would behave like that.

You could modify the script so that it would only give one class description for a player, though they may get the wrong one
if they do indeed have more than one 'IAMCLASS'.

- - - - - - - - - - - - - - - - - - - - - - - - - -

For this part:

if (CheckInventory("IAMNECRO") == 1)
{
Thing_Move (0, 49,1);
delay(15);
acs_execute(29,0,0,0,0);
}

If two players were to go necro, it may cause a problem since acs_execute wont fire if the script is already active.

Using acs_executealways instead will allow multiple instances of the same script to run, so that the script could work for each player.

http://zdoom.org/wiki/ACS_ExecuteAlways

Hope i helped a little.

Old Post 06-24-13 04:43 #
Cat God25 is offline Profile || Blog || PM || Search || Add Buddy IP || Edit || Quote
Unholypimpin
Member


Posts: 443
Registered: 03-11


It did thankyou.

Old Post 06-24-13 09:37 #
Unholypimpin is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit || Quote
All times are GMT. The time now is 23:20. Post New Thread    Post A Reply
 
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Doom Editing > LAN game ENTER script problem

Show Printable Version | Email this Page | Subscribe to this Thread

 

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are OFF
[IMG] code is ON
 

< Contact Us - Doomworld >

Powered by: vBulletin Version 2.2.5
Copyright ©2000, 2001, Jelsoft Enterprises Limited.