wierd problem.

Talk about any Deus Ex game modification here, e.g. maps, package or a total conversion.

Moderator: Forum Guards

wierd problem.

Postby Ayleth » Thu Apr 19, 07 4:38 pm

ok background: I saw a post on Bowens forum about making portals that randomly spew you out at any location in the map... so i decided to take a spin off that (he declined to make that mod due to randomness possibly launching you outside of level) and create kinda like the SG mod, but fully in actors ie summonable by admin. :D even got a cool effect for it. Anyways.... im having trouble with the actual teleport portion of the mod. It teleports fine, but only to 0,0,0, not to any random portal as it should.
Please note that i use wotgreal. it has a autocomplete function that when you type a class then a period (ie "DeusExPlayer.") it gives you a list of the properties of that class. Well, if i so this with this "PlayerSwitch" class, no properties come up as they should (ie the vector location, which i use here, and every actor has). Here is the code:

Code: Select all
class PortalSwitch extends Switch1;

var PortalSwitch PortalExit[10];

function Frob(Actor Frobber, Inventory frobWith)
{
    local PortalSwitch Portal;
    local int i;
    i=0;
    foreach allactors(class'PortalSwitch',Portal)
    {
        portalexit[i]=portal;    //make a list of all the portals in the level
        i++;
    }
    if (i==1)
    return;    //if only one portal, prevents player from being teleported.
    i=rand(i);        //select random portal
    Frobber.SetLocation(PortalExit[i].Location);   //do teleport
}


I also tried using an actor as the meat to the Portal, but i have the same problem. It teleports me to 0,0,0, and no properties if i do the aformentioned thing. I have never run into this problem b4 :S

EDIT: if i type "switch1." i get the properties listing, so i am confused.
¨‘°ºMåsåmµñ£º°‘¨
˙•●●ĊђασsΪηcǻяйαѓε●●•˙
jason.unger@gmail.com
User avatar
Ayleth
Regular
 
Posts: 313
Joined: Sun Jul 09, 06 7:27 pm
Location: 6 feet under. and trying to get out!

Postby Dae » Thu Apr 19, 07 5:27 pm

Code: Select all
    i=0;

no need for that as all int variables are 0 by default

try to log "PortalExit.Location" (Log(PortalExit[i].Location);) and see what it gives. Also log i variable.
If nothing interesting, I'll try to dig deeper.
User avatar
Dae
Alpha
 
Posts: 12086
Joined: Sat Sep 06, 03 4:40 pm

Postby Alex » Thu Apr 19, 07 5:36 pm

~[A]Daedalus~ wrote:
Code: Select all
    i=0;

no need for that as all int variables are 0 by default

try to log "PortalExit.Location" (Log(PortalExit[i].Location);) and see what it gives. Also log i variable.
If nothing interesting, I'll try to dig deeper.

Wrong. I think. Try to log PortalExit[i], not the location. If PortalExit[i] = None, then you're fucked.
Alex
Alpha
 
Posts: 8067
Joined: Wed Nov 12, 03 4:51 pm

Postby Ayleth » Fri Apr 20, 07 6:55 pm

thx guys but nobody came on later that day and hellped me out. i got a few problems now but im sure i can figure it out. i will start a new thread soon with pics etc of the mod in action.
¨‘°ºMåsåmµñ£º°‘¨
˙•●●ĊђασsΪηcǻяйαѓε●●•˙
jason.unger@gmail.com
User avatar
Ayleth
Regular
 
Posts: 313
Joined: Sun Jul 09, 06 7:27 pm
Location: 6 feet under. and trying to get out!


Return to Modifications

Who is online

Users browsing this forum: No registered users and 7 guests