Get current actorID

Post » Thu Jan 21, 2010 6:49 pm

Hi again community!

I'm still exploring the geck and working on a generic quest available from any NPC in the game. I was wondering if its possible to obtain the actorID of the current NPC since my quest is global and available from any npc? Anyone have an idea ?

Thanks again!
User avatar
Anne marie
 
Posts: 3454
Joined: Tue Jul 11, 2006 1:05 pm

Post » Thu Jan 21, 2010 6:23 pm

Hi again community!

I'm still exploring the geck and working on a generic quest available from any NPC in the game. I was wondering if its possible to obtain the actorID of the current NPC since my quest is global and available from any npc? Anyone have an idea ?

Thanks again!


Your quest being available on any NPC in the whole game is pretty uncommon.

Anyway, my understanding of this is - what you want requires you to to run code within the NPC itself and it is a process of elimination, not a report of what the ID is. You can do this either by scripting the NPC (which isn't available if you really want this available on every single NPC), or, you can use what we call a "token" to run code inside of the NPC.

If I were you I'd make your quest not be available on every single NPC... I've never even tried doing that and I think it would open up a bunch of complexities, in particular if you're new to the GECK and such.
User avatar
Carlos Rojas
 
Posts: 3391
Joined: Thu Aug 16, 2007 11:19 am

Post » Thu Jan 21, 2010 6:59 pm

Your quest being available on any NPC in the whole game is pretty uncommon.

Anyway, my understanding of this is - what you want requires you to to run code within the NPC itself and it is a process of elimination, not a report of what the ID is. You can do this either by scripting the NPC (which isn't available if you really want this available on every single NPC), or, you can use what we call a "token" to run code inside of the NPC.

If I were you I'd make your quest not be available on every single NPC... I've never even tried doing that and I think it would open up a bunch of complexities, in particular if you're new to the GECK and such.


Yeah im working on a beggar quest, available to all NPC to get used with the globals variables. Here what im trying to do :

- Character speech challenge for begging for some caps (working as intended)
- On success, I want to check the npc wallet with a dialogue condition to find out if he got some caps to spare (???)
- On fail do something (Working as intended)
- Remove the caps from the NPC wallet (???)
- Do more stuff such as adding a perk to the player, some variables for statistics etc.

Thats about it. My main concern is to get the active actorID for my script. Looping all npc seem a bit too intenssive but it worth a try.

thanks for your anwser!
User avatar
Alexander Lee
 
Posts: 3481
Joined: Sun Nov 04, 2007 9:30 pm

Post » Fri Jan 22, 2010 4:22 am

Yeah im working on a beggar quest, available to all NPC to get used with the globals variables. Here what im trying to do :

- Character speech challenge for begging for some caps (working as intended)
- On success, I want to check the npc wallet with a dialogue condition to find out if he got some caps to spare (???)
- On fail do something (Working as intended)
- Remove the caps from the NPC wallet (???)
- Do more stuff such as adding a perk to the player, some variables for statistics etc.

Thats about it. My main concern is to get the active actorID for my script. Looping all npc seem a bit too intenssive but it worth a try.

thanks for your anwser!


I think you can do this exact thing from the dialogue result scripts - - you would try removeitem with no qualifier right in there. But then, are you sure you actually need to pull directly from that NPC? You could always just do 'additem f and have the stuff appear out of thin air?
User avatar
Connie Thomas
 
Posts: 3362
Joined: Sun Nov 19, 2006 9:58 am


Return to Fallout: New Vegas