Home   Help Search Login Register  

Author Topic: Detecting dist, and some more.  (Read 5822 times)

0 Members and 1 Guest are viewing this topic.

Dane

  • Guest
Re:Detecting dist, and some more.
« Reply #30 on: 06 Aug 2005, 00:26:42 »
Aah yes, a bit more efficient, well it look's more nice an tidy ;)

Code: [Select]
_talkingDudes = [steyr1,officer1,hunter1,hunter2]

#loop
_talkingDude = _talkingDudes select random (count _talkingDudes)
_talkingDude switchmove "effectstandtalk"
~3 + (random 3)
_talkingDude switchmove "null"
?(eastDetected): goto "next"
goto "loop"

#next
{_X setCombatMode "RED"} forEach _talkingDudes
exit
« Last Edit: 06 Aug 2005, 01:39:34 by DaneDK »

DoDgY

  • Guest
Re:Detecting dist, and some more.
« Reply #31 on: 06 Aug 2005, 18:14:07 »
Looks great, thanks a lot ;)

DoDgY

  • Guest
Re:Detecting dist, and some more.
« Reply #32 on: 07 Aug 2005, 15:20:50 »
I tried the stacking boxes thing and it made this problem:
I used this script:
Code: [Select]
box2 setPos [getPos box1 select 0, getPos box1 select 1, 0.5]For some reason the boxes don't stack vertically only. I want:

[_]
[_]

not:

[_]
-[_]

If that makes sense ;)  Thanks. Is this problem caused by the box's "pos" not actually being in the centre of where it's put?



# Picture size edited by macguba
« Last Edit: 07 Aug 2005, 15:56:11 by macguba »

Offline sharkyjoe

  • Members
  • *
  • Have you taken a BMP out at 500 meters??
Re:Detecting dist, and some more.
« Reply #33 on: 07 Aug 2005, 15:32:31 »
I think that is the nature of the beast of OFP.

 If ya want it exactly on top and aligned perfectly there maybe a gap inbetween bottom and top.

Edit: Just checked one of my mission that I stacked boxes and it seems that they all go off a slight bit but the boxes on top seem to stack better. Maybe put the first one under ground and the others on top and you won't see the slight off center.

By the way, I have stuff stacked at a ship dock with things a skew(not perfect) and the little group that I had play the mission, didn't seem to care about perfectly aligned boxes. They just want to know where the next Loon was and if they could drive the BIG Transport Ship out to sea ::).
 
So I have Goofy Friends :D
« Last Edit: 07 Aug 2005, 15:49:38 by sharkyjoe »
Remember the 7 Ps??--- Proper Previous Planning Prevents Pathetically Poor Performance

Dane

  • Guest
Re:Detecting dist, and some more.
« Reply #34 on: 07 Aug 2005, 17:30:44 »
And another way:
box2 setPos [getPos box1 select 0 + 0.5, getPos box1 select 1 - 0.5, 0.5]
Try with different values untill you get it right.

DoDgY

  • Guest
Re:Detecting dist, and some more.
« Reply #35 on: 07 Aug 2005, 17:45:15 »
Cheers you two, I'll try both ways :)
EDIT: Sorry for the large image size. Thanks Macguba.
« Last Edit: 07 Aug 2005, 20:21:00 by DoDgY »

DoDgY

  • Guest
Re:Detecting dist, and some more.
« Reply #36 on: 07 Aug 2005, 21:02:31 »
Another question: I have a unit called steyr1. He has this in his init field:
steyr1 dowatch mate3
and it works fine until enemies come and he's still staring at mate3. I got a trigger ready to be used but I need something that makes him not watch mate3 anymore so he can engage the enemy.
 Is it something like:

steyr1 dowatch null
or
steyr1 dowatch objnull
?

Thanks.

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:Detecting dist, and some more.
« Reply #37 on: 07 Aug 2005, 21:17:42 »
perhaps dostop?
dostop steyr1
or stop:
steyr1 stop true

Dane

  • Guest
Re:Detecting dist, and some more.
« Reply #38 on: 08 Aug 2005, 03:37:22 »
steyr1 dowatch objnull is correct.

I don't think a dostop will stop him from doWatching ;D :-X

DoDgY

  • Guest
Re:Detecting dist, and some more.
« Reply #39 on: 08 Aug 2005, 17:00:06 »
Great, thanks again.
« Last Edit: 08 Aug 2005, 17:07:08 by DoDgY »

DoDgY

  • Guest
Re:Detecting dist, and some more.
« Reply #40 on: 09 Aug 2005, 19:55:25 »
A new problem has arisen (again).

This time I have a soldier who I need to cycle but in domove commands, not waypoints as they don't work the way they should in this case.

So all I want, really, is a way to check if this unit has completed his domove command before moving onto the next 1.

Code: [Select]
#one
unit domove getmarkerpos movemarker1
completed?
no goto "one"
yes goto "two"
#two
unit domove getmarkerpos movemarker2
completed?
no goto "two"
yes goto "three"
#three
...and so on...

So as you can see, I need to know how to do the completed, yes & no bits.

Thanks again.
« Last Edit: 09 Aug 2005, 19:56:30 by DoDgY »

Dane

  • Guest
Re:Detecting dist, and some more.
« Reply #41 on: 09 Aug 2005, 20:13:08 »
Code: [Select]
#one
unit domove getmarkerpos movemarker1
?! unitReady unit : goto "one"
? unitReady unit : goto "two"
#two
unit domove getmarkerpos movemarker2
?! unitReady unit : goto "two"
? unitReady unit : goto "three"
#three

Or

Code: [Select]
#one
unit domove getmarkerpos movemarker1
@? unitReady unit
#two
unit domove getmarkerpos movemarker2
@? unitReady unit
#three

« Last Edit: 09 Aug 2005, 20:14:39 by DaneDK »

Offline Pilot

  • Contributing Member
  • **
Re:Detecting dist, and some more.
« Reply #42 on: 09 Aug 2005, 20:26:05 »
Someone correct me if I am wrong, but I don't think @ and ? can be used together, try this:

unit domove getmarkerpos "movemarker1"
@unitReady unit
unit domove getmarkerpos "movemarker2"
@unitReady unit

-Student Pilot

EDIT:
And of course the labels don't need to be used if you use @
« Last Edit: 09 Aug 2005, 20:27:21 by Student Pilot »

DoDgY

  • Guest
Re:Detecting dist, and some more.
« Reply #43 on: 09 Aug 2005, 21:09:46 »
great! Thanks you two :D Quick reply too ;)

DoDgY

  • Guest
Re:Detecting dist, and some more.
« Reply #44 on: 12 Aug 2005, 21:09:53 »
I have one problem which I don't know if there's an answer to. The man I use to infiltrate the enemy base and drop his satchel charges, for some reason, keeps stopping and just looking at an enemy, then carrying on with his domoves, then stopping again.

In his init field I have:
Code: [Select]
this setcaptive true ; this  setbehaviour careless
I have tried the disableAI thing but it has no effect. If I make him a soldier friendly to who he's blowing up, he walks around fine but I need him to be an enemy to the soldiers in the base so he will be shot without having to script in everyone to shoot him at the end of his errand.

Will I have to make him a soldier firendly to the enemies or is there another way? Maybe revealing all of the enemy so he doesn't stop to look at them?

Anyway, thanks in advance for any help or feedback. :)

P.S. I was in a rush so sorry if anything's hard to understand.