Reztea

(Recruit Atris Mod) Can I get these certain scripts please?

Recommended Posts

Hope the title is self explanatory,

 

I need a script where an NPC (or PC) uses a force power on another NPC.

 

Only reason the title is plural is because I may need more if my ideas decided to flourish.

 

EDIT: Above statement is now true.

 

I'm in need of a script that clears all effects of an NPC with their tag (I tried to make this script myself, not working.)

Share this post


Link to post
Share on other sites

Please post the code that you've already tried to use.

 

I second that. You'll get more useful information from us if you try to solve the problem yourself first, and then present us with the exact issue and the code.

 

And generally, you're not very likely to get tutorial answers to questions of the type "How do you script ______?". Instead, try to think of an example in the game and go decompile those scripts and see how it's done there. If you run into issues, post about that and it'll be much easier for us to help you. Plus, you will learn more.

Share this post


Link to post
Share on other sites

Please post the code that you've already tried to use. Oftentimes it just needs a slight tweak, but if not, I can help out more.

 

I second that. You'll get more useful information from us if you try to solve the problem yourself first, and then present us with the exact issue and the code.

 

And generally, you're not very likely to get tutorial answers to questions of the type "How do you script ______?". Instead, try to think of an example in the game and go decompile those scripts and see how it's done there. If you run into issues, post about that and it'll be much easier for us to help you. Plus, you will learn more.

 

Alright, I'll look through the scripts, Bead-V

Here's my script for clearing all effects of an NPC (failed miserably)

 

 

void main() {

 
object oNPC=GetObjectByTag("Atton");
ClearAllEffects();
 
}

 

 

and I'm still in need of a script where a NPC could use a force power (Preferably Drain life or Force Lighting) on another NPC, that script plays a big role in the entire mod.

Share this post


Link to post
Share on other sites

If you write it like that, ClearAllEffects() is executed on the object that is the "OWNER" of the main function (the object that the script was run on).

 

If you know a function affects an object, and it doesn't take that object as a parameter, then you can assume it's gonna operate on the OWNER. You can use AssignCommand() to specify the OWNER if need be. In your case:

void main(){
    object oNPC = GetObjectByTag("Atton");

    AssignCommand(oNPC, ClearAllEffects());
}

If Atton was the owner of the script, however, your original script would work. But apparently he wasn't, so you were clearing the effects on some other object.

Edited by bead-v
  • Like 1

Share this post


Link to post
Share on other sites

If you write it like that, ClearAllEffects() is executed on the object that is the "OWNER" of the main function (the object that the script was run on).

 

If you know a function affects an object, and it doesn't take that object as a parameter, then you can assume it's gonna operate on the OWNER. You can use AssignCommand() to specify the OWNER if need be. In your case:

void main(){
    object oNPC = GetObjectByTag("Atton");

    AssignCommand(oNPC, ClearAllEffects());
}

If Atton was the owner of the script, however, your original script would work. But apparently he wasn't, so you were clearing the effects on some other object.

Script worked perfectly! Thank you.

 

I did a quick run down KT, I tried de-compiling A_Atrend2.ncs with DeNCS, was unsuccessful. This is getting so stressful now, this one last script would be so helpful.

 

Let's say it's a convo between Kreia and Mira. I would want Mira to hit Kreia with force lightning. I would need a script for this, one last help and I will be out of your hair! Thanks.

Share this post


Link to post
Share on other sites

Bump.

Admin: Re-read the rules - particularly sections 6 and 8 - and discover why your Deadly Stream reputation has gone down. Bumping a thread - in less than an hour and a half?

Share this post


Link to post
Share on other sites

I tried decompiling a_atrend2.ncs with DeNCS. I got "partial-byte code does not match", which I assume is also what you got. Now I'm gonna teach you a trick: right click on the binary code and select 'View Decompiled Code'.

 

Also, before you lose your head reading the entire script – this one has an include script inside it (or maybe several), and those functions and variables come first. So for the stuff specific to a_atrend2.ncs, you need to look at the end of the script.

Share this post


Link to post
Share on other sites

I tried decompiling a_atrend2.ncs with DeNCS. I got "partial-byte code does not match", which I assume is also what you got. Now I'm gonna teach you a trick: right click on the binary code and select 'View Decompiled Code'.

 

Also, before you lose your head reading the entire script – this one has an include script inside it (or maybe several), and those functions and variables come first. So for the stuff specific to a_atrend2.ncs, you need to look at the end of the script.

Expect no more Topics because YOU, my friend, SAVED MY LIFE. Thank you SO MUCH!!

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.