Jump to content
Sign in to follow this  
mrbean1112

Need some input

Recommended Posts

Hey guys... i need some input here.. i am making a zombie survival mission.. basically.. you will have to eat, sleep, and buy your own weapons. you get money for kills and various missions.

Here's the thing.... I have the sleep stuff goin well, but i need some ideas for eating.. right now the eating is a variable that is constantly increased... and at certain points it will have effects on the player.

now making the player "eat" would be simple.. just change w1hunger = w1hunger - 50

Now.. i need some times when the player could eat.. i have a guy who you can buy food from.. but all it does it sets w1hunger = w1hunger - (a number dependant on the food you buy)

However, i was wondering if there is any way i could like incoroprate objects into the game (Not new ones, use existing BIS ones/ other downloadable ones) because the players will be far away from places to buy food.. and i want them to have the option to eat without having to go to the market guy every time to eat.. even if i can just do this with the action menu... i figure it would go something like this

Buy Granola bar

w1 addaction ["eat granola bar",[granolabar.sqs"]

and in granolabar.sqs

_unit = this

?_unit == w1 : w1hunger == w1hunger - 50

?_unit == w2 : w2hunger == w2hunger - 50

yes, this mission is Multiplayer.

does anyone have any ideas on how to do this stuff easier? im pretty sure i am doing it in an ineffecient way.

example.. here is my hunger scripts

w1hunger = 1

#loop

?(player == w1):w1hunger = w1hunger + 1;

~10

goto "loop"

all it does is change all w1's to w2 for player 2.....

#w1hunger

?(w1hunger == 100): [] exec "KOHp1.sqs"

?(w1hunger == 150) :[] exec "VH1.sqs"

?(w1hunger == 200) :[] exec "S1.sqs"

goto "w1hunger"

that is the script that checks w1hunger. that also just changes for each player. and the numbers after Koh, Vh, and S are for the player.. as i have seperate scripts for each player.

I wrote this kind of confusing i know.. but if you can make out any of it.. help would be appreciated

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×