Home   Help Search Login Register  

Author Topic: Random Start  (Read 1543 times)

0 Members and 2 Guests are viewing this topic.

Endless

  • Guest
Random Start
« on: 24 Jul 2003, 00:28:04 »
How would i make a random start point like if i wanted to randomly start in one of 4 places, how would i do that?  ???

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:Random Start
« Reply #1 on: 24 Jul 2003, 00:35:11 »
This is probably not the best way of doing this but it should do the trick.

Activation:

[NameOfGuy,Startpoint1,Startpoint2,Startpoint3,Startpoint4] exec "startpoint.sqs"

Endless

  • Guest
Re:Random Start
« Reply #2 on: 24 Jul 2003, 00:39:19 »
For Startpoint1,Startpoint2,Startpoint3,Startpoint4 should those be markers?

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:Random Start
« Reply #3 on: 24 Jul 2003, 00:52:54 »
For Startpoint1,Startpoint2,Startpoint3,Startpoint4 should those be markers?

Game Logics.

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:Random Start
« Reply #4 on: 24 Jul 2003, 02:39:10 »
u can just group urself (or da unit ;)) to 1 of som markers (ny amount u want - 1 for each point)

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Endless

  • Guest
Re:Random Start
« Reply #5 on: 24 Jul 2003, 02:56:41 »
 :'( I still havent got ethier one of these solutions to work, Im probably doing it wrong since im not good with scripts :P

peter

  • Guest
Re:Random Start
« Reply #6 on: 24 Jul 2003, 03:44:32 »
@The real Armstrong:

_guy = _this select 0
_GLpos1 = _this select 1
_GLpos2 = _this select 1
_GLpos3 = _this select 1
_GLpos4 = _this select 1

canÂ't work ...

@Endless
change above into

_guy = _this select 0
_GLpos1 = _this select 1
_GLpos2 = _this select 2
_GLpos3 = _this select 3
_GLpos4 = _this select 4

and the script should work right ...

Endless

  • Guest
Re:Random Start
« Reply #7 on: 24 Jul 2003, 05:34:58 »
Ok this is what i have. I have the sqs file in the mission that im working ons folder. I have a soldier named end. and 4 game logics in different places with the names Startpoint1-4. Then I have a trigger and in the "On Activation" line i have
 [end,Startpoint1,Startpoint2,Startpoint3,Startpoint4] exec "startpoint.sqs"

And its not working, i start where i place my soldier in the editor.

 :'( :'(

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:Random Start
« Reply #8 on: 24 Jul 2003, 11:18:50 »
just put 4 markers were u want him 2 start - nd group da player 2 da markers - den it wil make daunitstarts in da sameposition of 1 of em

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Endless

  • Guest
Re:Random Start
« Reply #9 on: 24 Jul 2003, 18:47:34 »
n/m I got the other script to work  ;D ;D
Thx anyways tho
« Last Edit: 24 Jul 2003, 19:02:25 by Endless »

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:Random Start
« Reply #10 on: 24 Jul 2003, 19:04:21 »
@The real Armstrong:

_guy = _this select 0
_GLpos1 = _this select 1
_GLpos2 = _this select 1
_GLpos3 = _this select 1
_GLpos4 = _this select 1

canÂ't work ...

@Endless
change above into

_guy = _this select 0
_GLpos1 = _this select 1
_GLpos2 = _this select 2
_GLpos3 = _this select 3
_GLpos4 = _this select 4

and the script should work right ...


Was a bit tired. :P ;)

@ Endless: Press F2 and drag a line between the guy and the marker, never used this myself but it would do the trick cause LCD knows this shit. :P

EDIT: What da f00k? removed the message when I answerd u? U're evil ;D
« Last Edit: 24 Jul 2003, 19:05:49 by The real Armstrong »

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:Random Start
« Reply #11 on: 24 Jul 2003, 23:33:46 »
y ppl alwayz go 4 da (memory consuming ::)) complicated solutions :P

nywayz -now dat u got wat u want - solve da topic ;)

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Offline KTottE

  • Former Staff
  • ****
Re:Random Start
« Reply #12 on: 24 Jul 2003, 23:37:35 »
Code: [Select]
_num = random 5
_num = _num - (_num mod 1)

_num is now a whole integer, so you don't need <= to check it, and you can use == if you feel like it.

"Life is not a journey to the grave with the intention of arriving safely in a pretty and well preserved body, but rather to skid in broadside, thoroughly used up, totally worn out, and loudly proclaiming 'WOW What a Ride!'"