Home   Help Search Login Register  

Author Topic: Mushrooms  (Read 734 times)

0 Members and 1 Guest are viewing this topic.

marcus3

  • Guest
Mushrooms
« on: 10 Jul 2005, 00:09:08 »
ok i need help wiht a script that lets u "pick" mushrooms. so i made a script where u walk up to one and u the the action "pick mushroom" and when u walk away it gose away, and when u click the action the mushroom disapear's  and u get some food. ok here is where i need help.
after u get pick 1 mushroom and walk up to a another one is disapear's and u get food but the action is still there! help please!
here is a mission so u can look at the script's and stuff. it is a not a pbo.
thanks
(did this in a hurry so forgive the speeling and other mistke's)

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:Mushrooms
« Reply #1 on: 10 Jul 2005, 03:22:17 »
couldn't you just add the actions directly to the mushrooms?

then you just delete the mushroom and add to the food, no more shrooms, no more actions, no more problem

marcus3

  • Guest
Re:Mushrooms
« Reply #2 on: 10 Jul 2005, 14:15:55 »
it is looking like i will have to do that :'(
o well

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Mushrooms
« Reply #3 on: 10 Jul 2005, 14:21:47 »
Its not a problem.  In the inti.sqs put something like:

_mushrooms = [mush1,mush2....]

{_x addAction ["Pick mushroom", "PickMush.sqs"] } forEach _mushrooms



marcus3

  • Guest
Re:Mushrooms
« Reply #4 on: 10 Jul 2005, 16:33:28 »
about the second line where should me be'a putten that?

marcus3

  • Guest
Re:Mushrooms
« Reply #5 on: 10 Jul 2005, 16:58:04 »
ok lets see if i can make this a little easy'r on u guys
i placed a mushroom in its int i put
[this] exec "mushroom.sqs"
then the mushroom.sqs is this

#start

_mushroom = _this select 0


@(jason distance _mushroom < 2)


pick = jason addaction ["pick mushroom's","pickmushroom.sqs"]


#notyet

?(jason distance _mushroom > 3) : jason removeaction pick ; goto "start"


?(pick == 1) : goto "pick"

goto "notyet"

#pick
_mushroom setpos getpos trash

hint "u got some food"

food = food +5

pick = pick -1

goto "start"

then the pick.sqs is


jason removeaction pick

pick = pick +1

exit


and in the init.sqs i put


food = 0
pick = 0


there hope it help's

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:Mushrooms
« Reply #6 on: 10 Jul 2005, 18:32:06 »
no no no
name the mushrooms
put thobson's snippet in init.sqs (both lines)
where he has [mush1,mush2....] put your mushrooms names


and then your action script would be:

_mushroom = _this select 0
deletevehicle _mushroom
hint "You got some food"
food = food + 5
exit

i don't see what your pick variable would do

ok?

marcus3

  • Guest
Re:Mushrooms
« Reply #7 on: 10 Jul 2005, 18:47:24 »
well after i thought about it..........why whould mushrooms grow on a island out in the middle of the sea?

thanks for all u'r help tho