[HELP} Need help with simple scripting

Post » Sat Feb 19, 2011 12:00 am

alexscorpion:
Glad to hear it!

@davidlallen:
Ooh, that's really neat. Thanks for linking to the post.

I'd assume that, by "in the party", he means the actor has been specified as a player teammate via the http://geck.gamesas.com/index.php/SetPlayerTeammate function. Could that be what you were missing?

Cipscis
User avatar
Damned_Queen
 
Posts: 3425
Joined: Fri Apr 20, 2007 5:18 pm

Post » Sat Feb 19, 2011 3:02 am

I was using it on vanilla teammates. I was trying to do something just like the fingers/toes quest at a certain point in my mod. My character has CHA 8 ( +40% companion damage ) and often I just stand around while Boone and ED-E shoot everything. I was trying to find a way to have their kills drop fingers/toes, and as far as I can tell it just doesn't work.
User avatar
Roy Harris
 
Posts: 3463
Joined: Tue Sep 11, 2007 8:58 pm

Post » Fri Feb 18, 2011 8:39 pm

hello there again .. i seem to be stuck again :(

so i've been working on my armors level up/outfit menu
and recently i've switched to form list (eliminates using individual ref for each weapon/armor)

i have a global that goes from 0 to 3 (button press)
i have a form list with 4 armors
and i have a script that checks the global and then equips an armor from that list
if FormListIndex != AlexAssaultArmor || FormListIndex == AlexAssaultArmor  Set FormListIndex to AlexAssaultArmor      Set rArmorRef to ListGetNthForm AlexAssaultAllArmorList FormListIndex endif   If  rArmorRef != 0 getequiped rArmorRef == 0 && getdead == 0    if GetItemCount rArmorRef == 0         additem rArmorRef 1 1        equipitem rArmorRef 0 1  endif;also tried something like this If  rArmorRef != AlexAssaultArmor && getdead == 0      removeitem rArmorRef 1 1else     additem rArmorRef 1 1    equipitem rArmorRef 0 1endif

and this where i hit the bump ... i mean ... how do i remove and add armors with the same ref ID without writing down all possible combinations ..

thanks in advance
Alex
User avatar
Cash n Class
 
Posts: 3430
Joined: Wed Jun 28, 2006 10:01 am

Post » Sat Feb 19, 2011 5:20 am

hello there again .. i seem to be stuck again :(

so i've been working on my armors level up/outfit menu
and recently i've switched to form list (eliminates using individual ref for each weapon/armor)

i have a global that goes from 0 to 3 (button press)
i have a form list with 4 armors
and i have a script that checks the global and then equips an armor from that list
if FormListIndex != AlexAssaultArmor || FormListIndex == AlexAssaultArmor  Set FormListIndex to AlexAssaultArmor      Set rArmorRef to ListGetNthForm AlexAssaultAllArmorList FormListIndex endif   If  rArmorRef != 0 getequiped rArmorRef == 0 && getdead == 0    if GetItemCount rArmorRef == 0         additem rArmorRef 1 1        equipitem rArmorRef 0 1  endif;also tried something like this If  rArmorRef != AlexAssaultArmor && getdead == 0      removeitem rArmorRef 1 1else     additem rArmorRef 1 1    equipitem rArmorRef 0 1endif

and this where i hit the bump ... i mean ... how do i remove and add armors with the same ref ID without writing down all possible combinations ..

thanks in advance
Alex


Hm, I dont quite understand what your script does/is supposed to do. "if FormListIndex != AlexAssaultArmor || FormListIndex == AlexAssaultArmor" will always be true, and formListIndex is supposed to be a number while alexAssaultArmor looks like a ref, so a comparison makes no sense.

If you want to select an armor based on a menu button press, then first make sure that the menu buttons are in the same order as the armors in the list. Then set index to getButtonPressed, set armor to listGetNthForm AlexAssaultAllArmorList index, then add & equip armor.
User avatar
Francesca
 
Posts: 3485
Joined: Thu Jun 22, 2006 5:26 pm

Post » Fri Feb 18, 2011 7:15 pm

Hm, I dont quite understand what your script does/is supposed to do. "if FormListIndex != AlexAssaultArmor || FormListIndex == AlexAssaultArmor" will always be true, and formListIndex is supposed to be a number while alexAssaultArmor looks like a ref, so a comparison makes no sense.

If you want to select an armor based on a menu button press, then first make sure that the menu buttons are in the same order as the armors in the list. Then set index to getButtonPressed, set armor to listGetNthForm AlexAssaultAllArmorList index, then add & equip armor.



if FormListIndex != AlexAssaultArmor || FormListIndex == AlexAssaultArmor

i know ....it supposed to be always true ... cause otherwise the scipt will set the FormlistIndex to my Global in only one case .. true or false...

what i'm trying to do is to add one armor from a form list and at the same time remove the currently equiped armor from the npc inventory ...
User avatar
Jennifer Munroe
 
Posts: 3411
Joined: Sun Aug 26, 2007 12:57 am

Post » Sat Feb 19, 2011 7:31 am

nvm .. it has been solved
User avatar
Nicole Kraus
 
Posts: 3432
Joined: Sat Apr 14, 2007 11:34 pm

Post » Sat Feb 19, 2011 8:18 am

In case anybody is interested the solution is in the duplicate thread at newvegasnexus.
User avatar
Cash n Class
 
Posts: 3430
Joined: Wed Jun 28, 2006 10:01 am

Post » Sat Feb 19, 2011 5:24 am

In case anybody is interested the solution is in the duplicate thread at newvegasnexus.

lol
i don't think that anyone is interested but just in case here is the code
if (FormListIndex != AlexAssaultArmor || rArmorRef == 0) && GetDead == 0        if rArmorRef                RemoveItem rArmorRef 1        endif        set FormListIndex to AlexAssaultArmor        set rArmorRef to ListGetNthForm AlexAssaultAllArmorList FormListIndex        AddItem rArmorRef 1        EquipItem rArmorRef 0endif

User avatar
Crystal Clear
 
Posts: 3552
Joined: Wed Aug 09, 2006 4:42 am

Post » Fri Feb 18, 2011 10:18 pm

Is there a way to track the id of the mapmarker that you place with the right mouse button click in the pipboy world map menu ...
i mean it's showing just fine on the radar ingame .. so i assume that when the marker is placed in the pip-map there is an object placed into the fo -world also

Thanks
Alex
User avatar
Lauren Dale
 
Posts: 3491
Joined: Tue Jul 04, 2006 8:57 am

Post » Fri Feb 18, 2011 6:49 pm

...
User avatar
Da Missz
 
Posts: 3438
Joined: Fri Mar 30, 2007 4:42 pm

Post » Fri Feb 18, 2011 6:25 pm

hello there .. it seems that i've hit a wall once more .. with some simple ..

i'm trying to create an event on weapon reload

so far i've tried two methods

first http://geck.gamesas.com/index.php/GetAnimAction

Begin GameModeIf   Player.GetEquipped Ak103 && Player.GetAnimAction == 8   playsound UILevelUpendifend


and http://geck.gamesas.com/index.php/IsAnimPlaying

 if Player.GetEquipped Ak103 && Player.IsAnimPlaying ReloadF == 1 endifend

so in the first case it doesn't work ... it does work with other index .. like 0 when equipping a weapon

and in the second case it plays all the time
User avatar
C.L.U.T.C.H
 
Posts: 3385
Joined: Tue Aug 14, 2007 6:23 pm

Post » Sat Feb 19, 2011 4:56 am

Read the comments for GetAnimAction. I guess nobody ever took time to correct it.

(Oh, I didn't see how old the previous post was. Oops...)
User avatar
Miranda Taylor
 
Posts: 3406
Joined: Sat Feb 24, 2007 3:39 pm

Previous

Return to Fallout: New Vegas