lfnetwork.com mark read register faq members calendar

Thread: Three scripts I need
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 09-16-2011, 10:12 AM   #41
harIII
Veteran
 
harIII's Avatar
 
Join Date: Feb 2008
Posts: 978
Helpful! 
Hmmm, that's weird. Try this, I packed the two scripts in a zip folder.

http://min.us/myQme1lhO
harIII is offline   you may: quote & reply,
Old 09-16-2011, 03:58 PM   #42
Qui-Gon Glenn
Necessary Roughneck
 
Qui-Gon Glenn's Avatar
 
Join Date: May 2007
Location: Thessia
Posts: 1,464
Current Game: ME3MP, Arkham Origins
Folder extraordinaire Helpful! Forum Veteran Veteran Modder 
Very interesting indeed... the whole added " " near that"_" is quite strange.

Another workaround for this is to simply use the number constants that correspond to the DURATION_TYPE_*'s.... specifically 0,1 & 2.

From the lexicon:
Quote:
DURATION_TYPE_* Constant Group

Duration types for ApplyEffectAtLocation and ApplyEffectToObject functions.


Constants
Constant Value Description
DURATION_TYPE_INSTANT 0
Instantaneous. This would apply to any effect that is both immediate and permanent and cannot be removed. EffectDamage would be one example, as well as any of the 'fire-and-forget' visual effects.
DURATION_TYPE_PERMANENT 2
Permanent duration. This is as it sounds... the effect lasts until removed or dispelled
DURATION_TYPE_TEMPORARY 1
A temporary duration means that the effect must have a duration specified in the command (and is the only time this is so). Once the time has expired, the effect will be removed.
This brings about a potential explanation for a failed compilation, although harIII has it working. Essentially, you have applied a temporary effect, but you have not removed it... It should, according to definition, need a time limit.

Also, it is worth looking at what type of effect you are dealing with. Some effects should only be used as FNF, which means an instant duration should ONLY be applied.


Want to play a game of ME3MP?
Qui-Gon_Glenn on the software of which we shall not name.... add me and the enemy shall fall in chunks of crimson salsa
Qui-Gon Glenn is offline   you may: quote & reply,
Old 09-16-2011, 05:01 PM   #43
Warlord664
Junior Member
 
Warlord664's Avatar
 
Join Date: Jun 2011
Location: Computer Desk
Posts: 309
Current Game: swtor
Contest winner - Modding 
Ok the downloadthe sript ty Har . I just had the chance to try the script out. when I started the conversation it gets to the part where its activates the trigger. All it does is make the guy who was soppose to get killed by the other hostile and after the conversation ends he trys to attack me but fails because of the drop dead script and the other guy is still normal. If I make the conversation longer he just drops dead. Sooo...Now what did I do wrong? I didn't mess with the script.
Warlord664 is offline   you may: quote & reply,
Old 09-16-2011, 06:01 PM   #44
Qui-Gon Glenn
Necessary Roughneck
 
Qui-Gon Glenn's Avatar
 
Join Date: May 2007
Location: Thessia
Posts: 1,464
Current Game: ME3MP, Arkham Origins
Folder extraordinaire Helpful! Forum Veteran Veteran Modder 
Code:
void main() 
{
   object oObject1=GetObjectByTag("to'ggar");
   object oObject2=GetObjectByTag("degar");
   effect eStun = EffectDeath();

   ChangeToStandardFaction(oObject1, 12);
   ChangeToStandardFaction(oObject2, 13);
   ExecuteScript("k_ai_master",oObject1,1005);
   ExecuteScript("k_ai_master",oObject2,1005);
   DelayCommand(5.0,ApplyEffectToObject(0,eStun, oObject2));
}
This is a redo of your original script, Warlord664. The main difference is that I used the integer value of 0 instead of the word constant DURATION_TYPE_TEMPORARY. If you read my earlier post, using 0 changes this into a FNF, or fire-and-forget, effect, which is correct for the EffectDeath() function. This compiles fine, although I cannot guarantee that the results will be what you are looking for. You may also want to play with the length of the DelayCommand.

EDIT: To make this all happen according to how you want it to play out, you may want to simply build the combat into the dialog, and make the dialog fire the effect of death when you want it to. You can have a dialog with no words but plenty of animation calls and camera views...


Want to play a game of ME3MP?
Qui-Gon_Glenn on the software of which we shall not name.... add me and the enemy shall fall in chunks of crimson salsa

Last edited by Qui-Gon Glenn; 09-16-2011 at 06:31 PM.
Qui-Gon Glenn is offline   you may: quote & reply,
Old 09-16-2011, 06:54 PM   #45
Warlord664
Junior Member
 
Warlord664's Avatar
 
Join Date: Jun 2011
Location: Computer Desk
Posts: 309
Current Game: swtor
Contest winner - Modding 
What I wanted was in the conversation to have To'ggar swing his weapon at degar and kill him. but these script just make to'ggar sit there while degar drops dead. Is there an attack animationin the conversation that I can give to'ggar?

Edit: And I also realised that npcs that are aleady in game have alot more animation options in the dlg editer then npcs i put down. Is there a way to get these extra animations on my npcs?

Last edited by Warlord664; 09-16-2011 at 06:59 PM.
Warlord664 is offline   you may: quote & reply,
Old 09-16-2011, 07:02 PM   #46
Fallen Guardian
Wandering the Galaxy...
 
Fallen Guardian's Avatar
 
Join Date: Aug 2010
Location: Unknown Regions
Posts: 1,279
Current Game: Knights of the Old Republic
Veteran Modder Helpful! 
If you want To'ggar to swing his weapon and kill Degar here is the script for that:

Code:
void main ()

{

       object oShooter = GetObjectByTag("to'ggar");
	object oTarget = GetObjectByTag("degar", OBJECT_SELF, 1);

       ActionPauseConversation();

	ChangeToStandardFaction(oShooter, 2);
	ChangeToStandardFaction(oTarget, 4);

	ApplyEffectToObject(1, EffectAssuredHit(), oShooter, 0.3); 
	DelayCommand(0.3, AssignCommand(oShooter, ActionAttack(oTarget, 0))); 
}
That should make To'ggar do a default attack and kill Degar. Of course, you'd have to have Degar's health set to be something very low or time out how long it takes for To'ggar to run over to Degar and kill him and then have a delaycommand that applies instant death to Degar when To'ggar swings his weapon. As to the animation you would need a script that looks something like this:

Code:
AssignCommand(OBJECT_SELF, ActionPlayAnimation(25, 1.0, (-1.0)));
Of course you'd have to add in voidmain at the beginning as well as put the correct animation number in the place of 25 but that's the main gist of it.

Hope this helped.


The truly fallen cannot return to the light. If someone "falls" and "returns," they never really, truly fell.

Current Work in Progress: Dantooine Tension

Released Works
Blaster Pistol Enhancement
Dustil Restoration
Ebon Hawk Texture Enhancement
Gaffi Stick Improvement
Weapon Model Overhaul Texture Rework (Thanks to Toasty Fresh!)
Sunry Murder Recording Enhancement
VP's Hi Poly Tin Cans - KotOR 1 Version
Fallen Guardian is offline   you may: quote & reply,
Old 09-16-2011, 07:27 PM   #47
Warlord664
Junior Member
 
Warlord664's Avatar
 
Join Date: Jun 2011
Location: Computer Desk
Posts: 309
Current Game: swtor
Contest winner - Modding 
FG it won't let me compile the first script because of an error heres what it says

Quote:
DegarBatt.nss(1):Error: Type mismatch in parameter 2 in call to "GetObjectByTag"
Warlord664 is offline   you may: quote & reply,
Old 09-16-2011, 08:10 PM   #48
Fallen Guardian
Wandering the Galaxy...
 
Fallen Guardian's Avatar
 
Join Date: Aug 2010
Location: Unknown Regions
Posts: 1,279
Current Game: Knights of the Old Republic
Veteran Modder Helpful! 
Hmmm, Har, Glenn, any ideas?


The truly fallen cannot return to the light. If someone "falls" and "returns," they never really, truly fell.

Current Work in Progress: Dantooine Tension

Released Works
Blaster Pistol Enhancement
Dustil Restoration
Ebon Hawk Texture Enhancement
Gaffi Stick Improvement
Weapon Model Overhaul Texture Rework (Thanks to Toasty Fresh!)
Sunry Murder Recording Enhancement
VP's Hi Poly Tin Cans - KotOR 1 Version
Fallen Guardian is offline   you may: quote & reply,
Old 09-17-2011, 05:56 AM   #49
Qui-Gon Glenn
Necessary Roughneck
 
Qui-Gon Glenn's Avatar
 
Join Date: May 2007
Location: Thessia
Posts: 1,464
Current Game: ME3MP, Arkham Origins
Folder extraordinaire Helpful! Forum Veteran Veteran Modder 
Code:
void main ()

{

   object oShooter = GetObjectByTag("to'ggar");
   object oTarget = GetObjectByTag("degar", OBJECT_SELF, 1); 
   // Here is the problem, either need to declare oTarget as OBJECT_SELF or by tag, but not both

   ActionPauseConversation();
   ChangeToStandardFaction(oShooter, 2);
   ChangeToStandardFaction(oTarget, 4);
   ApplyEffectToObject(1, EffectAssuredHit(), oShooter, 0.3); 
   DelayCommand(0.3, AssignCommand(oShooter, ActionAttack(oTarget, 0))); 

}
By cutting out the orange part in the oTarget line, you will have a functional .nss that will compile fine
Nice work Fallen Guardian! You are working things out quite nicely


Want to play a game of ME3MP?
Qui-Gon_Glenn on the software of which we shall not name.... add me and the enemy shall fall in chunks of crimson salsa
Qui-Gon Glenn is offline   you may: quote & reply,
Old 09-17-2011, 10:39 AM   #50
Fallen Guardian
Wandering the Galaxy...
 
Fallen Guardian's Avatar
 
Join Date: Aug 2010
Location: Unknown Regions
Posts: 1,279
Current Game: Knights of the Old Republic
Veteran Modder Helpful! 
Quote:
Originally Posted by Qui-Gon Glenn View Post
Code:
void main ()

{

   object oShooter = GetObjectByTag("to'ggar");
   object oTarget = GetObjectByTag("degar", OBJECT_SELF, 1); 
   // Here is the problem, either need to declare oTarget as OBJECT_SELF or by tag, but not both

   ActionPauseConversation();
   ChangeToStandardFaction(oShooter, 2);
   ChangeToStandardFaction(oTarget, 4);
   ApplyEffectToObject(1, EffectAssuredHit(), oShooter, 0.3); 
   DelayCommand(0.3, AssignCommand(oShooter, ActionAttack(oTarget, 0))); 

}
By cutting out the orange part in the oTarget line, you will have a functional .nss that will compile fine
Nice work Fallen Guardian! You are working things out quite nicely

Thanks, I'm still not great at scripting as seen by my error though.


The truly fallen cannot return to the light. If someone "falls" and "returns," they never really, truly fell.

Current Work in Progress: Dantooine Tension

Released Works
Blaster Pistol Enhancement
Dustil Restoration
Ebon Hawk Texture Enhancement
Gaffi Stick Improvement
Weapon Model Overhaul Texture Rework (Thanks to Toasty Fresh!)
Sunry Murder Recording Enhancement
VP's Hi Poly Tin Cans - KotOR 1 Version
Fallen Guardian is offline   you may: quote & reply,
Old 09-20-2011, 07:42 AM   #51
Warlord664
Junior Member
 
Warlord664's Avatar
 
Join Date: Jun 2011
Location: Computer Desk
Posts: 309
Current Game: swtor
Contest winner - Modding 
I haven't had the chance to fix that script yet because I can't find my tsl play disk. Can some one give me a link to a no cd crack?

EDIT: Well I found one now I just have to figure out how to make it work.

Last edited by Warlord664; 09-20-2011 at 08:14 AM.
Warlord664 is offline   you may: quote & reply,
Old 09-22-2011, 02:12 PM   #52
Warlord664
Junior Member
 
Warlord664's Avatar
 
Join Date: Jun 2011
Location: Computer Desk
Posts: 309
Current Game: swtor
Contest winner - Modding 
Ok I just found my tsl play disk today so i was able try to fix this script. I took away the OBJECT_SELF like QGG said to do and it compiled fine Ty. I had to take out the PauseConversation thing but other then that it all worked fine. Ty you guys! But what i am currently trying to do is replace one of the doors in nar shadda with a custom utd. I would think all i would have to do is make the utd and change the name of the tag of the door thats going to be there in the .git but nooo it doesn't work. Can some one tell me what im missing here?

EDIT: nvm just got the door to work...not sure what was wrong with it...Oh well.

Last edited by Warlord664; 09-22-2011 at 02:35 PM.
Warlord664 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 > Three scripts I need

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 07:07 AM.

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