Jump to content

Script help please. :(


ObLars

Recommended Posts

Scn BighornUrinGatherScript

Ref MyBigHornBigRef
Begin OnActivate
Player.additem BighornUrin 1

End

 

So, im pretty much a noob when it comes too Scripts, and im trying to gain one bottle of BighornUrin when i Activate MyBigHornBigRef, which is a Bighorn Reference.

Dont ask me why, or what im going to use Urin for but i really need some advice for this.

When i use Cipscis Script Validator i get this Warning; The local variable "MyBigHornBigRef" was never assigned a value in this script. And i got no idea what so ever what that means. Could anyone please be so kind to help me out? Kudos in order. :) Thanks

Link to comment
Share on other sites

what this means is that you have a variable that you've never used

what you need to do, is check if the thing you activated is actually a BigHorn, or it will just give you the urine every time you activate something

or, if you attach the script to this creature, than you don't even need the variable

 

the thing is, that you've never assigned the variable a value

that's why you get a problem

 

if you don't know what this means, it's like:

 

int MyNum

set MyNum to 5 (or it could be set 5 to MyNum, can't recall......)

 

anyhow, i hope this helps

Link to comment
Share on other sites

Ah. So i could bycross the warning message by attaching it to the Reference in the script , also known as one of the bighorns i just created? And that would yield 1 bighorn urine bottle when i E, space it? Also, geck wont let me save it, as there is something missing, i.e the value. Also, could you try and "clean" the script up? I.e add a value? (Angelface)
Link to comment
Share on other sites

well, i'm not 100% sure about how good this script will be

you see, if you spawn this creature, than any time you click on it, you'll get the urine, so you can cheat with this

what i would recommend is to give this creature the urine as death item (if you want the player to take the urine off the corpse)

if these creatures are supposed to live, than you should make a cheat preventing system (so i player will be able to get only a specific amount of urine per creature)

 

now, i'm not sure if you can attach the script to a creature (never tried that), but you can do a check, that will get the ref of the thing you are activating, and if it is the creature, than you get the urine

 

i really hope you can get this to work :)

Link to comment
Share on other sites

well, i'm not 100% sure about how good this script will be

you see, if you spawn this creature, than any time you click on it, you'll get the urine, so you can cheat with this

what i would recommend is to give this creature the urine as death item (if you want the player to take the urine off the corpse)

if these creatures are supposed to live, than you should make a cheat preventing system (so i player will be able to get only a specific amount of urine per creature)

 

now, i'm not sure if you can attach the script to a creature (never tried that), but you can do a check, that will get the ref of the thing you are activating, and if it is the creature, than you get the urine

 

i really hope you can get this to work :)

 

 

Hmm, well. It's not intended to be a cheat :P I just want to be able to (In round one) To get the script to do what i want, for instance. Then i'll probobly add a timer, so that i can only drain the bighorn for 2-3 bottles a day, max. :) I know i can attach it to the bighorn itself, but since im missing that variable value i can't even save it. :( The idea behind it was to drain the bighorn for milk, as in a ranch, but since there is no Milk in vanilla New Vegas. I simply changed the ID of Dirty-Water to Bighorn Urine. And altared the stats to be more urine like. :)

Link to comment
Share on other sites

well, i'm not 100% sure about how good this script will be

you see, if you spawn this creature, than any time you click on it, you'll get the urine, so you can cheat with this

what i would recommend is to give this creature the urine as death item (if you want the player to take the urine off the corpse)

if these creatures are supposed to live, than you should make a cheat preventing system (so i player will be able to get only a specific amount of urine per creature)

 

now, i'm not sure if you can attach the script to a creature (never tried that), but you can do a check, that will get the ref of the thing you are activating, and if it is the creature, than you get the urine

 

i really hope you can get this to work :)

 

 

Hmm, well. It's not intended to be a cheat :P I just want to be able to (In round one) To get the script to do what i want, for instance. Then i'll probobly add a timer, so that i can only drain the bighorn for 2-3 bottles a day, max. :) I know i can attach it to the bighorn itself, but since im missing that variable value i can't even save it. :( The idea behind it was to drain the bighorn for milk, as in a ranch, but since there is no Milk in vanilla New Vegas. I simply changed the ID of Dirty-Water to Bighorn Urine. And altared the stats to be more urine like. :)

 

in this case, you know that you can attach the script to the creature, so you don't need the ref at all

so if you remove that variable, it should work just fine (though i would test the script in the game, to make sure you don't get the urine from any other creature)

also, i would add a check to see if the creature is alive, as it's rather hard to milk urine off a dead creature, right?? :tongue:

 

another thought is that if you can retexture, i'm sure you can get the milk bottle to look like a full one, so you can get actual milk :)

 

anyhow, i hope this helps you

Link to comment
Share on other sites

well, i'm not 100% sure about how good this script will be

you see, if you spawn this creature, than any time you click on it, you'll get the urine, so you can cheat with this

what i would recommend is to give this creature the urine as death item (if you want the player to take the urine off the corpse)

if these creatures are supposed to live, than you should make a cheat preventing system (so i player will be able to get only a specific amount of urine per creature)

 

now, i'm not sure if you can attach the script to a creature (never tried that), but you can do a check, that will get the ref of the thing you are activating, and if it is the creature, than you get the urine

 

i really hope you can get this to work :)

 

 

Hmm, well. It's not intended to be a cheat :P I just want to be able to (In round one) To get the script to do what i want, for instance. Then i'll probobly add a timer, so that i can only drain the bighorn for 2-3 bottles a day, max. :) I know i can attach it to the bighorn itself, but since im missing that variable value i can't even save it. :( The idea behind it was to drain the bighorn for milk, as in a ranch, but since there is no Milk in vanilla New Vegas. I simply changed the ID of Dirty-Water to Bighorn Urine. And altared the stats to be more urine like. :)

 

in this case, you know that you can attach the script to the creature, so you don't need the ref at all

so if you remove that variable, it should work just fine (though i would test the script in the game, to make sure you don't get the urine from any other creature)

also, i would add a check to see if the creature is alive, as it's rather hard to milk urine off a dead creature, right?? :tongue:

 

another thought is that if you can retexture, i'm sure you can get the milk bottle to look like a full one, so you can get actual milk :)

 

anyhow, i hope this helps you

 

 

Haha, awesome. It worked :) Kudos to you, sire. Now, i might retexture the milkbottle later :P Im in the developer stage of this mod :P Thanks a lot mate. Now, you got any idea how to do the check if creature alive/dead part. Also need to figure out the Timer thing :P Thanks mate!

Link to comment
Share on other sites

this function will tell you if the creature is dead

 

well, for the timer, you can use this function

and if you want the milking to require more time (let's say, once a week) than you can also use this function

 

now, i have just found all of those, so im not really sure how they work, or how to use them, but i'm sure you'll do fine :)

Link to comment
Share on other sites

Okai. New Question. How could i let the script determine if the actor is dead or alive? I want to be able to activate for urine when the actor is alive, and search it when its dead. At the moment, i can activate the actor for Urine when its alive, AND dead. Kudos are in order. :)

 

Scn BighornUrinGatherBigScript
 Begin OnActivate
 Player.additem BighornUrin 3 
 End

Link to comment
Share on other sites

  • Recently Browsing   0 members

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