lfnetwork.com mark read register faq members calendar

Thread: Area time stop?
Thread Tools Display Modes
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Old 03-21-2009, 06:42 PM   #1
Malxados
Rookie
 
Malxados's Avatar
 
Join Date: Feb 2009
Location: Mandalore
Posts: 224
Current Game: Warframe, SC Blacklist, KOTOR1
Question Area time stop?

I have two questions:
1) What exactly is the time stop effect ("effect EffectTimeStop();") and will it work for TSL?

2)How would I apply said effect or another (such as paralysis) to every enemy in/ the entire area?

Thanks
Malxados

EDIT: BTW, I was hoping to use this as a force power script.


"But God demonstrates His own love toward us, in that while we were still sinners, Christ died for us." (Romans 5:8, NKJV)
"For the wages of sin is death, but the gift of God is eternal life in Christ Jesus our Lord." (Romans 6:23, NKJV)

Ask me about my sig!

Bao-Dur: I'll take the one who was stupid enough to threaten us instead of shoot us when he had the chance.

k_inc_force bothers me.

Last edited by Malxados; 03-22-2009 at 12:17 AM.
Malxados is offline   you may: quote & reply,
Old 03-22-2009, 10:37 AM   #2
glovemaster
Now-a-days GroovyCarrot
 
Join Date: Jan 2007
Location: Liverpool, UK
Posts: 697
Current Game: No time for games, sadly
Helpful! 
The EffectStopStop() simply stops everything, does what it says really. Its kinda like a pause without being paused - So I'd imagine it probably is what the game fires when you hit pause.

The effect is pretty useless as the PC can't move either. Would have been pretty cool otherwise though


If you're looking for any of the junk I did a few years ago; you can probably still find it all on filefront
glovemaster is offline   you may: quote & reply,
Old 03-22-2009, 11:23 AM   #3
Malxados
Rookie
 
Malxados's Avatar
 
Join Date: Feb 2009
Location: Mandalore
Posts: 224
Current Game: Warframe, SC Blacklist, KOTOR1
What would the script look like to paralyze everyone in the area (for a spell)?


"But God demonstrates His own love toward us, in that while we were still sinners, Christ died for us." (Romans 5:8, NKJV)
"For the wages of sin is death, but the gift of God is eternal life in Christ Jesus our Lord." (Romans 6:23, NKJV)

Ask me about my sig!

Bao-Dur: I'll take the one who was stupid enough to threaten us instead of shoot us when he had the chance.

k_inc_force bothers me.
Malxados is offline   you may: quote & reply,
Old 03-22-2009, 11:53 AM   #4
glovemaster
Now-a-days GroovyCarrot
 
Join Date: Jan 2007
Location: Liverpool, UK
Posts: 697
Current Game: No time for games, sadly
Helpful! 
The script to paralyse all hostiles in the current area would looks like this:
Code:
void main() {
    // Duration of paralysis
    fDuration = 10.0; // Just change this to how long you want to paralyze enemies for.
	
    // Paralyse all hostiles in the area.
    object oTarget = GetFirstObjectInArea(GetArea(OBJECT_SELF), OBJECT_TYPE_CREATURE);
    while(GetIsObjectValid(oTarget)) {
        if(GetIsEnemy(oTarget)) {
            ApplyEffectToObject(DURATION_TYPE_TEMPORARY, oTarget, EffectParalyze(), fDuration);
            
            oTarget = GetNextObjectInArea(GetArea(OBJECT_SELF), OBJECT_TYPE_CREATURE);
        }
    }
}
Just change the 10.0 to how ever long it needs to be for.


If you're looking for any of the junk I did a few years ago; you can probably still find it all on filefront
glovemaster is offline   you may: quote & reply,
Old 03-22-2009, 12:13 PM   #5
stoffe
Mostly dormant
 
stoffe's Avatar
 
Status: Administrator
Join Date: Apr 2002
Posts: 5,834
Helpful! 10 year veteran! Notable contributor 
Quote:
Originally Posted by glovemaster View Post
The script to paralyse all hostiles in the current area would looks like this:
Show spoiler


Just change the 10.0 to how ever long it needs to be for.
Move the GetNextObjectInArea() line outside the conditional check or the loop would get stuck as soon as it encounters any NPC who isn't hostile to the one running the script.

Also you have the Target and Effect parameters in the wrong order in the ApplyEffectToObject() call.


mt
stoffe is offline   you may: quote & reply,
Old 03-22-2009, 12:23 PM   #6
glovemaster
Now-a-days GroovyCarrot
 
Join Date: Jan 2007
Location: Liverpool, UK
Posts: 697
Current Game: No time for games, sadly
Helpful! 
Whooops thanks Stoffe

This one should work
Code:
void main() {
    // Duration of paralysis
    fDuration = 10.0; // Just change this to how long you want to paralyze enemies for.
	
    // Paralyse all hostiles in the area.
    object oTarget = GetFirstObjectInArea(GetArea(OBJECT_SELF), OBJECT_TYPE_CREATURE);
    while(GetIsObjectValid(oTarget)) {
        if(GetIsEnemy(oTarget)) {
            ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectParalyze(), oTarget, fDuration);  
        }
        oTarget = GetNextObjectInArea(GetArea(OBJECT_SELF), OBJECT_TYPE_CREATURE);
    }
}


If you're looking for any of the junk I did a few years ago; you can probably still find it all on filefront
glovemaster is offline   you may: quote & reply,
Old 03-22-2009, 03:57 PM   #7
Malxados
Rookie
 
Malxados's Avatar
 
Join Date: Feb 2009
Location: Mandalore
Posts: 224
Current Game: Warframe, SC Blacklist, KOTOR1
Thanks.
I'll hopefully be able to try it out soon.

EDIT: Also, what would I put for the duration to make it permanent?

EDIT2: It gives me the error "Undeclared identifier "fDuration"" for lines 3 and 9, even if I don't change anything.


"But God demonstrates His own love toward us, in that while we were still sinners, Christ died for us." (Romans 5:8, NKJV)
"For the wages of sin is death, but the gift of God is eternal life in Christ Jesus our Lord." (Romans 6:23, NKJV)

Ask me about my sig!

Bao-Dur: I'll take the one who was stupid enough to threaten us instead of shoot us when he had the chance.

k_inc_force bothers me.

Last edited by Malxados; 03-22-2009 at 04:03 PM.
Malxados is offline   you may: quote & reply,
Old 03-22-2009, 05:02 PM   #8
GeorgNihilus
Forumite
 
GeorgNihilus's Avatar
 
Join Date: Mar 2007
Location: Somewhere in the Outer Rim
Posts: 600
Current Game: Skyrim
Wink Ok ...

Quote:
Originally Posted by Malxados View Post
EDIT: Also, what would I put for the duration to make it permanent?
I don't know, just put a bigggggg number ...

Quote:
Originally Posted by Malxados View Post
EDIT2: It gives me the error "Undeclared identifier "fDuration"" for lines 3 and 9, even if I don't change anything.
You need to declare fDuration before giving it a number, try this one, it compiled clean for me but I haven't tested it ...

void main() {

float fDuration;
// Duration of paralysis
fDuration = 1000.0 // Just change this to how long you want to paralyze enemies for.

// Paralyse all hostiles in the area.
object oTarget = GetFirstObjectInArea(GetArea(OBJECT_SELF), OBJECT_TYPE_CREATURE);
while(GetIsObjectValid(oTarget)) {
if(GetIsEnemy(oTarget)) {
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectParalyze(), oTarget, fDuration);
}
oTarget = GetNextObjectInArea(GetArea(OBJECT_SELF), OBJECT_TYPE_CREATURE);
}
}

hope it helps


TSL Mods
Nar Shaddaa hidden complex http://knightsoftheoldrepublic.filef..._Complex;91257
Mandalorian camo Armors in-game http://lucasforums.com/showthread.php?t=204159
Telos polar plateau sidequest 1.2 http://lucasforums.com/showthread.php?t=202436

KotOR Mods
A lost sith in a nameless world http://knightsoftheoldrepublic.filef...ss_World;96040
GeorgNihilus is offline   you may: quote & reply,
Old 03-22-2009, 05:21 PM   #9
Malxados
Rookie
 
Malxados's Avatar
 
Join Date: Feb 2009
Location: Mandalore
Posts: 224
Current Game: Warframe, SC Blacklist, KOTOR1
Really? It gave me an error at line 8: "syntax error at "object"". If it helps, this should be for TSL.


"But God demonstrates His own love toward us, in that while we were still sinners, Christ died for us." (Romans 5:8, NKJV)
"For the wages of sin is death, but the gift of God is eternal life in Christ Jesus our Lord." (Romans 6:23, NKJV)

Ask me about my sig!

Bao-Dur: I'll take the one who was stupid enough to threaten us instead of shoot us when he had the chance.

k_inc_force bothers me.
Malxados is offline   you may: quote & reply,
Old 03-22-2009, 05:23 PM   #10
stoffe
Mostly dormant
 
stoffe's Avatar
 
Status: Administrator
Join Date: Apr 2002
Posts: 5,834
Helpful! 10 year veteran! Notable contributor 
Quote:
Originally Posted by Malxados View Post
Thanks.
I'll hopefully be able to try it out soon.

EDIT: Also, what would I put for the duration to make it permanent?

EDIT2: It gives me the error "Undeclared identifier "fDuration"" for lines 3 and 9, even if I don't change anything.
Change DURATION_TYPE_TEMPORARY to DURATION_TYPE_PERMANENT when applying the effect.

As for fDuration it hasn't been declared yet when a value is assigned to it, which must be done for the compiler to know what data type it's supposed to be. But if the effect is supposed to be permanent it has no purpose and can be removed.

Code:
void main() {   
    effect eParalyze = EffectParalyze();
    object oTarget = GetFirstObjectInArea();
    
    while (GetIsObjectValid(oTarget)) {
        if (GetIsEnemy(oTarget)) {
            ApplyEffectToObject(DURATION_TYPE_PERMANENT, eParalyze, oTarget);  
        }
        
        oTarget = GetNextObjectInArea();
    }
}


mt
stoffe is offline   you may: quote & reply,
Old 03-22-2009, 05:30 PM   #11
Malxados
Rookie
 
Malxados's Avatar
 
Join Date: Feb 2009
Location: Mandalore
Posts: 224
Current Game: Warframe, SC Blacklist, KOTOR1
Thanks, yours compiled fine. However, I was hoping to make one with a permanent duration and one or more with a temporary duration (which I've been unsuccessful at).

Anyone?


"But God demonstrates His own love toward us, in that while we were still sinners, Christ died for us." (Romans 5:8, NKJV)
"For the wages of sin is death, but the gift of God is eternal life in Christ Jesus our Lord." (Romans 6:23, NKJV)

Ask me about my sig!

Bao-Dur: I'll take the one who was stupid enough to threaten us instead of shoot us when he had the chance.

k_inc_force bothers me.

Last edited by Malxados; 03-22-2009 at 07:05 PM.
Malxados is offline   you may: quote & reply,
Old 03-22-2009, 07:35 PM   #12
Star Admiral
N7 Commando
 
Star Admiral's Avatar
 
Join Date: Oct 2008
Location: Omega 4 Relay
Posts: 656
Current Game: Mass Effect 2
Folder extraordinaire Helpful! 
Same as what stoffe posted, except change DURATION_TYPE_PERMANENT to DURATION_TYPE_TEMPORARY and add a time such as 30.00.

Code:
void main() {   
    effect eParalyze = EffectParalyze();
    object oTarget = GetFirstObjectInArea();
    
    while (GetIsObjectValid(oTarget)) {
        if (GetIsEnemy(oTarget)) {
            ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eParalyze, oTarget, 30.00);  
        }
        
        oTarget = GetNextObjectInArea();
    }
}
- Star Admiral
Star Admiral is offline   you may: quote & reply,
Old 03-22-2009, 09:52 PM   #13
Malxados
Rookie
 
Malxados's Avatar
 
Join Date: Feb 2009
Location: Mandalore
Posts: 224
Current Game: Warframe, SC Blacklist, KOTOR1
Yay! All three (powers) worked! Thanks guys. Its really funny walking right past tons of enemies. I think I even froze one in mid-air. Hopefullly after I finish some technicalities I can upload it.


"But God demonstrates His own love toward us, in that while we were still sinners, Christ died for us." (Romans 5:8, NKJV)
"For the wages of sin is death, but the gift of God is eternal life in Christ Jesus our Lord." (Romans 6:23, NKJV)

Ask me about my sig!

Bao-Dur: I'll take the one who was stupid enough to threaten us instead of shoot us when he had the chance.

k_inc_force bothers me.
Malxados is offline   you may: quote & reply,
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Go Back   LucasForums > Network > Knights of the Old Republic > Editing / Modding > Holowan Laboratories > Area time stop?

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:51 AM.

LFNetwork, LLC ©2002-2011 - All rights reserved.
Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.