Jump to content

Script Help


Recommended Posts

I am trying to compose a script that will make the while wasteland the opposite gender of the player. I got through the easy part but can't figure out how to make it affect all actors. I am a noob, dis is what I got:

 

scn SexChangeScript

 

 

begin GameMode

 

if SameSexAsPC == 1

SexChange

 

 

 

endif

end

Link to comment
Share on other sites

Well, first of all, that script has no idea who it's meant to be working on, you need a reference. Second, I assume it's an object script, which means you'd need to link it to every single NPC yourself, which would horribly break your game. Finally, even if you do get this working all the NPCs will stil sound the same. If you're a man Doc Mitchell's going to be an old woman with a very masculine voice. Anyway, if you've got your heart set on this, then I'd recommend finding a way to set one reference to everyone in the wasteland and then change the gender of that reference. Also, I could be wrong here and I apologise if I am, but I don't think the command you're using will work on NPCs, again it's very likely that I'm wrong so don't take that point to heart. Sorry to be so negative and to sound so harsh but I don't really understand why you'd want to do that anyway and it just seems like a lot of work. You'll need every NPC's uniqie reference and you'd need to assign ones to those that don't have references. I apologise if I'm missing some glaringly obvious solution but that's the only way I see of doing it. Again my sincere apologies for being incredibly negative. Edited by Jojash
Link to comment
Share on other sites

Well, first of all, that script has no idea who it's meant to be working on, you need a reference. Second, I assume it's an object script, which means you'd need to link it to every single NPC yourself, which would horribly break your game. Finally, even if you do get this working all the NPCs will stil soubd the same. If you're a man Doc Mitchell's going to be an old woman with a very masculine voice. Anyway, if you've hot your heart set on this, then I'd reccomend finding a way to set one reference to everyone in the wasteland and then change the gender of that reference. Also, I could be wrong here and I apologise if I am, but I don't think the command you're using will work on NPCs, again it's very likely that I'm wrong so don't take that point to heart. Sorry to be so negative and to sound so harsh but I don't really understand why you'd want to do that anyway and it just seems like a lot of work. You'll need every NPC's uniqie reference and you'd need to assign ones to those that don't have references. I apologise if I'm missing some glaringly obvious solution but that's the only way I see of doing it. Again my sincere apologies for being incredibly negative.

I made this post because I need a reference (or references), thanks for the reminder. I mentioned I was a noob but there was nothing you told me that I didn't already know. Plus, my script works just swell when attached to an NPC thank you.

 

Side Note: Keep in mind I am working with NVSE and have access to its additional functions. I am just hopeful someone knows a code that'll help me reference all actors...

Link to comment
Share on other sites

My apologies then sir, because you said you were a noob, I assumed you didn't realise that you need a reference. I also apologise for not being very helpful and not providing any new information. I don't think you're going to be able to find a reference that will affect everyone in the game and short of listing every unique NPC reference and assigning new references to NPCs that don't have them, I can't think of a way of getting this to work. I also apologise for impling that your script didn't work. That was me being an idiot and forgetting that object scripts don't need references for affecting the object that they're linked to. I think your main problem here is scale, I suppose if you made an explosion that did no damage, didn't knock people back and had a horrendously large are of effect that added an effect with this script attached to it, then that might work for the exteriors, but the interiors, Freeside, the Lucky 38 and Boulder city, unless I'm mistaken, would remain unchanged, also I have no idea how unstable this would be. I suppose you could put another explosion in those cells. Apologies for any offence caused by my previous post.

 

If you're hoping for a function that'll give a reference to all actors, I think you're going to have a hard time. I could be wrong however, and you can look for one here if you like.

Edited by Jojash
Link to comment
Share on other sites

I've not tried it myself, but you could probably just add an activator to the spot you want the explosion to be in and attach a script that places the explosion at it and then disables the activator, something like this:

 

Scn ExplosionScript

Begin GameMode

  ExplosionName.PlaceAtMe 1
  Disable
  MarkForDelete

End

Link to comment
Share on other sites

NVSE would make this even simpler with ref-walking.

 

scn nameofquestscript

ref currentactor

begin gamemode

  set currentactor to getfirstref 42 1 0

  label 10
  if(currentactor)
     if(currentactor.samesexaspc)
        currentactor.sexchange
     endif
     set currentactor to getnextref
     goto 10
  endif

end

 

Attach this to a running quest, and it will scan NPCs in the same cell as the player each time the quest script runs.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...