Script function to get weapon currently equipped?

Post » Sat May 28, 2011 3:17 pm

I tried this when the package was sandbox, and it did not work. But now they are travel like the normal captives.



The problem is not they are getting back up, its that they are not sitting down. They simple stand where I place them in the geck, and dont move. I need to get them to sit down in the first place. I have a travel package for each of them, with the marker as its target, so its even more specific than the general FFSupermutantCaptives package that uses the linked ref, which I tried originally, and which did not work either... :/


If you are using the marker as the destination, then they will go to the marker and stand there. I ran into this when trying to get my NPC to sit in a chair where I had moved a marker to. In that case I used the sandbox package, BUT not a zero radius - use like 50 units and only the 'furniture (other than beds) box.
If you have a marker that you can put a persistent reference on, use that as the Travel package desination with 0 radius, like this one: MegLucyWestSitsInMoriartys
User avatar
Monique Cameron
 
Posts: 3430
Joined: Fri Jun 23, 2006 6:30 am

Post » Sat May 28, 2011 5:11 am

NPC pathing issue, dirty save issue???


I have fully navmeshed the area, so that shouldnt be it, plus the guy who leaves the room does it just fine, so I dont think thats the issue. And I use a totally clean save to test this one (since it can be done simple with a Setstage then Coc command, nothing else needed) so its not a dirty save.

If you are using the marker as the destination, then they will go to the marker and stand there. I ran into this when trying to get my NPC to sit in a chair where I had moved a marker to. In that case I used the sandbox package, BUT not a zero radius - use like 50 units and only the 'furniture (other than beds) box.
If you have a marker that you can put a persistent reference on, use that as the Travel package desination with 0 radius, like this one: MegLucyWestSitsInMoriartys


I do not have their destination set as a marker near the furniture marker, I have the actual 'sit on ground tied up' marker set as the destination... I have done this kind of thing before with no problem... I have made people sit in chairs, made them do pushups (via a sandbox, radius 0, with the pushups marker as destination) so I dont get why the hell this one is not working, for any of them... I have tried like 6 different set ups and none of them have worked. :/
User avatar
Chloe Botham
 
Posts: 3537
Joined: Wed Aug 30, 2006 12:11 am

Post » Sat May 28, 2011 5:50 pm

I can't find this 'sit on floor tied up marker' that you refereed to to take a look myself, but If you are using an idle, remember that ides can have conditions on them. You can look up these conditions by finding your idle in the tool bar under Game Play --> Idle Animations...
User avatar
brenden casey
 
Posts: 3400
Joined: Mon Sep 17, 2007 9:58 pm

Post » Sat May 28, 2011 10:28 am

Haha yea, sorry I couldnt remember its name at the time of typing that and the geck wasnt open. I think its called FFCaptiveMarker. Its an idle marker, so maybe it does have conditions still? I will look at that but I dont know what they would be. :/
User avatar
Chloe Yarnall
 
Posts: 3461
Joined: Sun Oct 08, 2006 3:26 am

Post » Sat May 28, 2011 2:36 pm

Haha yea, sorry I couldnt remember its name at the time of typing that and the geck wasnt open. I think its called FFCaptiveMarker. Its an idle marker, so maybe it does have conditions still? I will look at that but I dont know what they would be. :/


It's not an idle marker. It's in the furniture section.

FFCaptiveMarker is a furniture marker named Rstrained Sit. There is an idle called RestrainedSit with the condition furnituremarkerID 18, which FFCaptiveMarker has, so I'm at a loss as to why it isn't working.
User avatar
TIhIsmc L Griot
 
Posts: 3405
Joined: Fri Aug 03, 2007 6:59 pm

Post » Sat May 28, 2011 1:04 pm

I looked at the conditions like pkleiss suggested, there are three things that have to do with this animation group. Sitting down, standing up, and sitting idle in the position. Their conditions are GetSitting == 2, == 4, and == 1, respectively. As the http://geck.gamesas.com/index.php/GetSitting wiki page says for them to sit down, they need to be at == 2, or getting ready to sit. Shouldnt they be getting ready to sit, since they have to use the sit marker?? I dont get why this isnt working. T.T
User avatar
Far'ed K.G.h.m
 
Posts: 3464
Joined: Sat Jul 14, 2007 11:03 pm

Post » Sat May 28, 2011 6:26 pm

I looked at the conditions like pkleiss suggested, there are three things that have to do with this animation group. Sitting down, standing up, and sitting idle in the position. Their conditions are GetSitting == 2, == 4, and == 1, respectively. As the http://geck.gamesas.com/index.php/GetSitting wiki page says for them to sit down, they need to be at == 2, or getting ready to sit. Shouldnt they be getting ready to sit, since they have to use the sit marker?? I dont get why this isnt working. T.T


I had another problem with chairs, and it had to do with ownership. I'd click the chair in the console, then 'clearownership' to make it work. Try FFCaptiveMarkerREF.ClearOwnership on it. With the ref ID number
User avatar
Annika Marziniak
 
Posts: 3416
Joined: Wed Apr 18, 2007 6:22 am

Post » Sat May 28, 2011 5:45 pm

Umm... alright, though they arent owned by anyone at all right now so I dont see how that would affect it. But I guess its worth a try.
User avatar
Gill Mackin
 
Posts: 3384
Joined: Sat Dec 16, 2006 9:58 pm

Post » Sat May 28, 2011 6:13 am

The free form encounters that use that marker also have the captives using the 'FFER19SupermutantCaptiveCaptured' AI package - which is a find pacakge. Perhaps look at that package for a clue as to how to get it to work.
User avatar
Jynx Anthropic
 
Posts: 3352
Joined: Fri Sep 08, 2006 9:36 pm

Post » Sat May 28, 2011 7:54 am

Well no luck yet on getting them to sit down. :/

But I have another question reguarding this. How can I make it so that when they are killed, they give no EXP? Since killing each one gives me about 60 exp, I dont want a free 200 exp going to the player. That would be stupid, and kill immersion. Are there fose commands for this? How would I do this?
User avatar
Floor Punch
 
Posts: 3568
Joined: Tue May 29, 2007 7:18 am

Post » Sat May 28, 2011 6:23 am

If I am not mistaken (I asked this question about a year ago when I was a noob), the XP for a kill is hardwired into the game, but you can decrease it by lowering the level of the NPC. I've never tried a level 0 actor, but maybe that will prevent any XP from being awarded. Also, you might be able to circumvent the kill by script and then use killactor with a dummy actor supplying the killing blow to avoid the XP reward for the player as well. Perhaps giving the NPC a huge amount of health, and then when their health gets below some threshold, use the script to kill off the NPC in the aforementioned way. Its just a thought.
User avatar
lexy
 
Posts: 3439
Joined: Tue Jul 11, 2006 6:37 pm

Post » Sat May 28, 2011 4:24 pm

If I am not mistaken (I asked this question about a year ago when I was a noob), the XP for a kill is hardwired into the game, but you can decrease it by lowering the level of the NPC. I've never tried a level 0 actor, but maybe that will prevent any XP from being awarded. Also, you might be able to circumvent the kill by script and then use killactor with a dummy actor supplying the killing blow to avoid the XP reward for the player as well. Perhaps giving the NPC a huge amount of health, and then when their health gets below some threshold, use the script to kill off the NPC in the aforementioned way. Its just a thought.


Ooooh thats a good idea. Since the player has one weapon (they HAVE to have that one) I can make it do say 100 dmg, then have the npc's have 110 health, and if they go below like 50 health, script kills them. So you still only shoot them once, but dont actually kill them. Thanks :D
User avatar
Jason King
 
Posts: 3382
Joined: Tue Jul 17, 2007 2:05 pm

Post » Sat May 28, 2011 7:47 pm

Just a note about this. Normally, if the player does 51% of the damage to an actor but doesn't supply he killing blow, he will still get some XP. I don't know if this holds true with killactor, but if it does, just give the NPC 1000 Health and kill them when they reach 950 or something.
User avatar
Steph
 
Posts: 3469
Joined: Sun Nov 19, 2006 7:44 am

Post » Sat May 28, 2011 1:07 pm

You don't even need to bother checking their health - just use an http://geck.gamesas.com/index.php/OnHit or http://geck.gamesas.com/index.php/OnHitWith block.

It would probably be a good idea to have the gun do a very small amount of damage, or give the prisoners a large amount of health, in case the user is also using a mod that increases damage globally.

Cipscis
User avatar
Emma-Jane Merrin
 
Posts: 3477
Joined: Fri Aug 08, 2008 1:52 am

Post » Sat May 28, 2011 7:11 am

I agree with Cipscis, if you know the weapon that will be used, those two block will make it even easier to code.
User avatar
Rachel Cafferty
 
Posts: 3442
Joined: Thu Jun 22, 2006 1:48 am

Post » Sat May 28, 2011 9:03 am

Well no luck yet on getting them to sit down. :/


Just wondering - you have 3 captives, right? So do you have three separate packages and three markers? Because the FFCaptiveMarker only seats one.
User avatar
Tracy Byworth
 
Posts: 3403
Joined: Sun Jul 02, 2006 10:09 pm

Post » Sat May 28, 2011 10:01 am

Just wondering - you have 3 captives, right? So do you have three separate packages and three markers? Because the FFCaptiveMarker only seats one.

Yes. I have 3 captives with 3 different packages, and three different FFCaptiveMarkers.
User avatar
krystal sowten
 
Posts: 3367
Joined: Fri Mar 09, 2007 6:25 pm

Post » Sat May 28, 2011 10:30 am

Yes. I have 3 captives with 3 different packages, and three different FFCaptiveMarkers.

I looked on mine to see how I had it setup...
1. FFCaptiveMarker - persistant - link parent set to nearby Xmarker (not necessary)
2. Find package - specific ref set to FFCaptiveMarkers Ref - allow search is checked but nothing filled in - Must complete and continue during combat are checked.
That's it... the find package is first in the slaves package list, but I never even had to set restrained on her... I think she likes it.
User avatar
Michelle Serenity Boss
 
Posts: 3341
Joined: Tue Oct 17, 2006 10:49 am

Post » Sat May 28, 2011 9:21 pm

I looked on mine to see how I had it setup...
1. FFCaptiveMarker - persistant - link parent set to nearby Xmarker (not necessary)
2. Find package - specific ref set to FFCaptiveMarkers Ref - allow search is checked but nothing filled in - Must complete and continue during combat are checked.
That's it... the find package is first in the slaves package list, but I never even had to set restrained on her... I think she likes it.

Haha, alright. I will try a find package instead of travel.
User avatar
Glu Glu
 
Posts: 3352
Joined: Sun Apr 01, 2007 5:39 am

Previous

Return to Fallout 3