Home   Help Search Login Register  

Author Topic: Silent Boats  (Read 3872 times)

0 Members and 1 Guest are viewing this topic.

Offline The-Architect

  • Former Staff
  • ****
  • Bite my shiny metal...
    • Bob's Un-official Flashpoint Page
Re:Silent Boats
« Reply #30 on: 14 Feb 2004, 15:19:53 »
Could you make a gull addon Col. but with, say 1 eagle or a flock of crows or summit? It would be cool to have 1 big eagle circling around at the top of a cliff. You could have a bird pack. With that Mule going around, the animated Dog and the Cow, Flashpoint is really starting to get realistic in terms of non combatbeings.
« Last Edit: 15 Feb 2004, 01:45:07 by The-Architect »
James Andrew Wilkinson 1977 - 2005 R.I.P.
"If it ain't the friggin' incoming it's the friggin' outgoing. Only difference is who gets the friggin' grease, and that ain't no friggin' difference at all."

PsyWarrior

  • Guest
Re:Silent Boats
« Reply #31 on: 14 Feb 2004, 17:45:11 »
Greets,

Non-combat beings? That's not a term I've heard before for "animals"  ;D

Some first person solutions:

-Give the driver the ability to look right behind him (as in 180 degrees). The player can then steer with the keyboard.
-add a commander position, facing forward. It doesn't exactly solve the problem, I know, but it's an idea...

Be back if I think of any more "useful" ideas...  ::)

-PsyWarrior
-PsyProductions

Offline The-Architect

  • Former Staff
  • ****
  • Bite my shiny metal...
    • Bob's Un-official Flashpoint Page
Re:Silent Boats
« Reply #32 on: 15 Feb 2004, 01:45:15 »
 ;D
James Andrew Wilkinson 1977 - 2005 R.I.P.
"If it ain't the friggin' incoming it's the friggin' outgoing. Only difference is who gets the friggin' grease, and that ain't no friggin' difference at all."

Dubieman

  • Guest
Re:Silent Boats
« Reply #33 on: 15 Feb 2004, 04:30:51 »
Whoo hoo my first HOT topic yeah!  ;D :) ;) :o 8)

I like the rowboat and the 180 view thing would work cause in real life people can turn their head like about 160 degrees or chin on the back of their shoulder. A cargo seat facing forward would help that can communicate to the driver.

Cargo;vehiclechat: Turn left you idiot!

By the way anyone got a solid link to those fishing trawlers as I can't seem to find them.... :(

I think we need more vehicles with an area where you can walk around in during transport. Man overboard!

Good job Col. Klink  :thumbsup:

Offline Colonel_Klink

  • Members
  • *
  • Independent Addon Creator
    • DC3D Game Modelling Zone
Re:Silent Boats
« Reply #34 on: 15 Feb 2004, 11:05:14 »
Rebel without a pause...D.I.L.L.I.G.A.F.

Dubieman

  • Guest
Re:Silent Boats
« Reply #35 on: 18 Feb 2004, 05:32:59 »
Thanks! Looks good.  :o

Offline Messiah

  • Honourary OFPEC Patron & Drinking Buddy of Wolfsbane
  • Honoured Contributor
  • ***
  • OFPEC Veteran
    • Project UK Forces
Re:Silent Boats
« Reply #36 on: 20 Feb 2004, 06:06:16 »
Could you make a gull addon Col. but with, say 1 eagle or a flock of crows or summit? It would be cool to have 1 big eagle circling around at the top of a cliff. You could have a bird pack. With that Mule going around, the animated Dog and the Cow, Flashpoint is really starting to get realistic in terms of non combatbeings.

the sea gulls are already available in OFP - you just need to know how to script them into your mission... you need both the following scripts and name them correctly as well:

Name: seagulls14b.sqs

Code: [Select]
; Seagull v.1.4b
; Author: Petroizki
; E-mail: -
; PARAMETERS: [TRIGGER, OBJECT, NUMBER_OF_BIRDS, AREA_WIDTH]
; EXAMPLE: [triggeri, player, 20, 500] exec "seagulls14b.sqs"
; When you want seagulls to die:  g_bExit = true
;
; TRIGGER: Make sure you use triggers name instead of 'this'.
;
; OBJECT: Object for middle point on rectangle. If you want invisible middle point use Game Logic, which initialization is: this SetDammage 1
; player   = DEFAULT
;
; NUMBER_OF_BIRDS: ...Well put at least 1...
; 1        = DEFAULT
;
; AREA_WIDTH: Width and height of the area, which in the seagulls are flying.
; 500      = DEFAULT
;
; SPECIAL_FEATURE strings:
; ""       = DEFAULT
; "GROUP"  = Birds fly in group
; "LANDED" = Bird is landed, takes off only if human approaches and lands immediatily if human is far enough
; "FLYING" = Bird just flies, doesn't ever land
; "SEA"    = Bird doesn't land, flyis often very low

;DEBUGGER    = false

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Global variables
g_oTrigger   = _this select 0
g_oObject    = _this select 1
g_nSeagull   = _this select 2
g_nArea      = _this select 3
;g_strSpecial = _this select 4

g_nAltitude  = 8
g_nAreaDiv2  = g_nArea / 2
g_nAreaMax   = g_nArea * 2
g_bChaseMe   = false
g_nChaseMe   = 0
g_oChaseMe   = player
g_bExit      = false
g_nExitReportion = 0
g_bGroupLand = false
g_oGroupLand = player
g_bHuman     = false
g_nHumanTime = 0
g_xPosition  = (getPos g_oObject) select 0
g_yPosition  = (getPos g_oObject) select 1
g_aSeagull   = []

; Check limits
?g_nArea < 1      : g_nArea = 500; hint "The area for seagulls can't be less than 1.\nDEFAULT 500 set."
?isNull g_oObject : g_oObject = player; hint "The object for seagulls can't be NULL.\nDEFAULT player set."
?g_nSeagull <= 0  : g_nSeagull = 1; hint "0 seagulls can't be created.\nDEFAULT 1 set."

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Seagull creation loop
_i = g_nSeagull
_nCounter = 0
#Creation
?_i <= 0 : goto "MainLoop"
   ; Get seagulls starting position
   ?_nCounter == 0 : _xPosition = g_xPosition + g_nAreaDiv2; _yPosition = _xPosition
   ?_nCounter == 1 : _xPosition = g_xPosition + g_nAreaDiv2; _yPosition = g_yPosition - g_nAreaDiv2
   ?_nCounter == 2 : _xPosition = g_xPosition - g_nAreaDiv2; _yPosition = _xPosition
   ?_nCounter == 3 : _xPosition = g_xPosition - g_nAreaDiv2; _yPosition = g_yPosition + g_nAreaDiv2; _nCounter = -1
   _nCounter = _nCounter + 1
   ; Create seagull
   _oNewSeagull = "SeaGull" camCreate [_xPosition, _yPosition, g_nAltitude]
;   ?g_strSpecial == "LANDED" : _oNewSeagull setPos [_xPosition, _yPosition, 0]
   ; Save seagull's array
   g_aSeagull = g_aSeagull + [_oNewSeagull]
   ; Bring seagull to life
   [_oNewSeagull] exec "seagull14b.sqs"
   _i = _i - 1
   ~.05
goto "Creation"
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Main loop
#MainLoop
   ~3
   ?g_bExit : goto "Destruction"
   ; Timeout for human alarm
   ?g_nHumanTime < time : g_bHuman = false
   ; Timeout for chasing
   ?g_nChaseMe < time : g_bChaseMe = false
   ; Human present, stop group landing
   ?g_bHuman : g_bGroupLand = false
   
   ; Update object and triggers position
   g_xPosition = (getPos g_oObject) select 0
   g_yPosition = (getPos g_oObject) select 1
   g_oTrigger setPos (getPos g_oObject)
goto "MainLoop"
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Destruction
#Destruction
g_bChase = false
; Wait for seagulls to report
@(g_nExitReportion == g_nSeagull)

; Destroy seagulls
_i = g_nSeagull - 1
#DestructionLoop
   camDestroy (g_aSeagull select _i)
   _i = _i - 1
?_i > -1 : goto "DestructionLoop"

goto "Terminate"
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
#Terminate
exit

Name: Seagull14b.sqs

Code: [Select]
; Seagull v.1.4b
; Author: Petroizki
; E-mail: -

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Local variables
_bChase      = false
_nCounter    = (random 6) + 1
_nTimeout    = 1000
_strReturn   = ""

_xPosition   = 0
_yPosition   = 0
_oSeagull    = _this select 0
_nState      = 0

goto "SeagullBrain"
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Chase other seagull, seagull stored in g_oChaseMe
#Chase
; Hope it's not me how is chasen, if then let's fly
?g_oChaseMe == _oSeagull : goto "Fly"

_bChase = true
; Get random position around chasen seagull, and fly there
_xWaypoint = (random 4) - 2
_yWaypoint = (random 4) - 2
_xWaypoint = _xWaypoint + ((getPos g_oChaseMe) select 0)
_yWaypoint = _yWaypoint + ((getPos g_oChaseMe) select 1)
goto "FlyTo"
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Check human presence
#CheckHumanPresence
; amount of units able to fire the trigger
_aList = list g_oTrigger
_i     = (count _aList) - 1
?_i < 0 : goto _strReturn

;?DEBUGGER : hint format ["Seagull:\nThere are %1 units in world", _i]

#HumanCheckLoop
   ?(_oSeagull distance (_aList select _i)) < 20 : g_bHuman = true; g_nHumanTime = time + 5; goto "Fly"
   _i = _i - 1
   ~.01
   ?_i < 0 : goto _strReturn
goto "HumanCheckLoop"
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Generate random position to fly, and then fly there
#Fly
_xWaypoint = (random g_nArea) - g_nAreaDiv2
_yWaypoint = (random g_nArea) - g_nAreaDiv2
_xWaypoint = _xWaypoint + ((getPos g_oObject) select 0)
_yWaypoint = _yWaypoint + ((getPos g_oObject) select 1)
goto "FlyTo"
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Fly to certain position which is stored in _xWaypoint, _yWaypoint
#FlyTo
_nState = 0
~.1
; Get waypoint's vector, to calculate the length of trip
_xWPVector = (getPos _oSeagull) select 0
_yWPVector = (getPos _oSeagull) select 1
_xWPVector = _xWPVector - _xWaypoint
_yWPVector = _yWPVector - _yWaypoint

; Calculate the vector lenght, so we know the distance of seagull from the waypoint, and the time taken to trip
_nTripLength = sqrt(_xWPVector*_xWPVector + _yWPVector*_yWPVector)

;?DEBUGGER : hint format ["Seagull:\nFlying to position:\n%1, %2, %3\nTrip length: %4", _xWaypoint, _yWaypoint, g_nAltitude, _nTripLength]

; Fly there
_oSeagull camSetPos [_xWaypoint, _yWaypoint, g_nAltitude + (random 4) - 2]

; I assume that the seagull doesn't fly faster than 47km/h (= ~13m/s).
_nTimeToTrip = _nTripLength / 13

?_bChase : _nTimeToTrip = _nTimeToTrip / 5

~_nTimeToTrip

?_nState == 1 : _nState = 0; goto "Landing"

goto "SeagullBrain"
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Land
#Landing
; Landed

_nTimeout = _nTimeout + time
_strReturn = "TimeoutLoop"
#TimeoutLoop
   ~2
   ?g_bExit : g_nExitReportion = g_nExitReportion + 1; exit
   ; Stay in ground, don't hover over land.
   _xPosition = (getPos _oSeagull) select 0
   _yPosition = (getPos _oSeagull) select 1
   _oSeagull camSetPos [_xPosition, _yPosition, 0]
   _nTime = time
   ?_nTime > _nTimeout : goto "Fly"
; Let's check human presence, returns back to #TimeoutLoop
?!g_bHuman : goto "CheckHumanPresence"

goto "Fly"
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Group land
#LandGroup
_xWaypoint = (random 20) - 10
_yWaypoint = (random 20) - 10
_xWaypoint = _xWaypoint + ((getPos g_oGroupLand) select 0)
_yWaypoint = _yWaypoint + ((getPos g_oGroupLand) select 1)
; We wanna land
_nState    = 1
goto "FlyTo"
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Seagull's brain
#SeagullBrain
~1
?g_bExit : g_nExitReportion = g_nExitReportion + 1; exit
?g_strSpecial == "LANDED" : _nTimeout = 1000; goto "Landing"
?g_bChaseMe && (g_oChaseMe distance _oSeagull) < 50 : goto "Chase"

?_oSeagull distance g_oObject > g_nArea_max : _oSeagull setPos [(getPos g_oObject) select 0 + g_nAreaDiv2, (getPos g_oObject) select 1 + g_nAreaDiv2, g_nAltitude]

?_nCounter > 0 : _nCounter = _nCounter - 1; goto "Fly"

_nCounter = (random 6) + 2

?!g_bChaseMe && (random 10) < 1 : g_oChaseMe = _oSeagull; g_bChaseMe = true; g_nChaseMe = time + (random 40) + 20

?!g_bGroupLand && (random 5) < 1 : g_bGroupLand = true; g_oGroupLand = _oSeagull; goto "Landing"
?g_bGroupLand && (g_oGroupLand distance _oSeagull) < 100 : _nTimeout = (random 120) + 60; goto "LandGroup"

_nTimeout = (random 50) + 10

goto "Landing"
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
« Last Edit: 20 Feb 2004, 06:11:03 by Messiah »
Proud Member of the Volunteer Commando Battalion

Offline The-Architect

  • Former Staff
  • ****
  • Bite my shiny metal...
    • Bob's Un-official Flashpoint Page
Re:Silent Boats
« Reply #37 on: 20 Feb 2004, 09:08:09 »
What will that do?
James Andrew Wilkinson 1977 - 2005 R.I.P.
"If it ain't the friggin' incoming it's the friggin' outgoing. Only difference is who gets the friggin' grease, and that ain't no friggin' difference at all."

Offline Colonel_Klink

  • Members
  • *
  • Independent Addon Creator
    • DC3D Game Modelling Zone
Re:Silent Boats
« Reply #38 on: 20 Feb 2004, 09:58:04 »
They are the scripts I implemented for the fishing boats and the seagull control center
Rebel without a pause...D.I.L.L.I.G.A.F.

Offline Messiah

  • Honourary OFPEC Patron & Drinking Buddy of Wolfsbane
  • Honoured Contributor
  • ***
  • OFPEC Veteran
    • Project UK Forces
Re:Silent Boats
« Reply #39 on: 20 Feb 2004, 14:05:10 »
are they? cool... they are just some scripts that i had lying around, didn't take them from your pbo...

people forget that in the original CWC a seagul appears in the intro for the campaign  ;)
Proud Member of the Volunteer Commando Battalion

Offline The-Architect

  • Former Staff
  • ****
  • Bite my shiny metal...
    • Bob's Un-official Flashpoint Page
Re:Silent Boats
« Reply #40 on: 20 Feb 2004, 14:36:33 »
Since I know zip about scripting, where on that would be the altitude of the gulls?
I can copy and paste as good as the next guy, so I could get it working. However the altitude bit is what I want.
James Andrew Wilkinson 1977 - 2005 R.I.P.
"If it ain't the friggin' incoming it's the friggin' outgoing. Only difference is who gets the friggin' grease, and that ain't no friggin' difference at all."

Offline Messiah

  • Honourary OFPEC Patron & Drinking Buddy of Wolfsbane
  • Honoured Contributor
  • ***
  • OFPEC Veteran
    • Project UK Forces
Re:Silent Boats
« Reply #41 on: 20 Feb 2004, 19:40:56 »
those scripts have a random altitude generator - so the birds fly, swoop and land as they wish, to an extent.... i'm no scripting guru either - try asking on the scripting boards
Proud Member of the Volunteer Commando Battalion