Home   Help Search Login Register  

Author Topic: Crating Waypoints form Scratch  (Read 2250 times)

0 Members and 1 Guest are viewing this topic.

Fishion

  • Guest
Crating Waypoints form Scratch
« on: 21 Aug 2002, 13:50:09 »
Is it possible?

Haven't done much with OFP for a long time, so far I haven't found a way, but maybe something is simple eluding me ???

-Fishion  

Offline Black_Feather

  • Former Staff
  • ****
  • I'll never forget you Daisey.
Re:Crating Waypoints form Scratch
« Reply #1 on: 21 Aug 2002, 18:18:16 »
you can create move waypoints

unitname move [500,100]

Navy_Seals

  • Guest
Re:Crating Waypoints form Scratch
« Reply #2 on: 21 Aug 2002, 18:37:23 »
Or another way, put a game logic (g1 let's say) where u want the d00de to go and write unitname DoMove GetPos g1 or unitname Move GetPos g1, cheers ;)

Fishion

  • Guest
Re:Crating Waypoints form Scratch
« Reply #3 on: 21 Aug 2002, 18:54:25 »
While I was on the bus, I realised that I spend so much time
on the Subject that I didn't realise I didn't explain what I
wanted well enough.

The Problem is I create a Unit via a Script, which is cool,
and works like good. Using DoMove [x,y] will make the thing
very very complicated (so far I think I'll have 120 Scripts
when I'm finished, so using a loop cycle to create a
WaypointCycle, will be a pain in my Afterpart, and since OFP
has this nice and cool "waypoint managment system" build in
it would be redundant to build my own, I just can access it).

Moving Waypoint ain't work since the unit doesn't have
anywaypoints.

Any Ideas?

-Fishion

Offline Ottie

  • Members
  • *
  • And you think this is personal
Re:Crating Waypoints form Scratch
« Reply #4 on: 22 Aug 2002, 10:30:40 »
What you can do is:

In the editor Create a unit and give this unit the waypoints you want the newly created unit (via script) to have, in the initfield of this unit created with the editor write

group1 group this; deleteVehicle this;

Then when you create the unit via the script, let this unit join group1 and when this unit is created it will follow the waypoints of the deleted unit

If you dont understand it I can make a demo/example mission

If you can't beat them, buy them

Offline Ottie

  • Members
  • *
  • And you think this is personal
Re:Crating Waypoints form Scratch
« Reply #5 on: 22 Aug 2002, 15:42:08 »
You can also look in thisthread for solutions and a demo

http://www.ofpec.com/yabbse/index.php?board=6;action=display;threadid=65
If you can't beat them, buy them

Fishion

  • Guest
Re:Crating Waypoints form Scratch
« Reply #6 on: 22 Aug 2002, 19:06:03 »
Yes but the big problem is the following:
I don't know how may Groups I will have to build from Scratch,
it will definitly be more than 100...so the Porposed System won't work, and by simply looking at the number you'll know that doing that with a Script will create a Serious overhead

-Fishion

Bremmer

  • Guest
Re:Crating Waypoints form Scratch
« Reply #7 on: 22 Aug 2002, 19:13:10 »
Over a hundred groups created from scratch?!  :o

What on earth are you doing? Perhaps if you give us a bit more background info we might be able to come up with a work around.

Cheers

Fishion

  • Guest
Re:Crating Waypoints form Scratch
« Reply #8 on: 22 Aug 2002, 19:44:20 »
 ;D

Basically, I'm splitting Islands up into Sectors, Sector Size is
about 800 meters, because normally you can't see Objects
beyond that, and that is sufficient for combat with Small arms.

What I basically do is, I remove Civilians and Enemies if you can't see them anymore, and create them if you will soon be able to see them (managing what you can see or not is done
with the Sectors).
So far it works fine, and I can (theoretically) populate a whole
Island with Civilians in every town (let's say 20-30).
I've even created a Indy4-Like Interface to talk to them (I got some Screenshots if anybody is intersted). It is all very well,
only problem is that the Civilians can't move (well they can, but they don't have waypoints). For Civilians this isn't so much
of a problem, it's more a problem now that I also want to Include Enemy Units in this System.
Doing that by a Script means that I have a Public array, that
contains:
a) the Group ID
b) all waypoint of that Group
c) what waypoint is active
Sounds like the Waypoints BIS is using doesn't it?  :-\

The only possible thing I can Imagine, is to somehow be able
to Split a Group in a way that each created Group still has the
same Waypoints...then I could move the Waypoints per Script,
and I'm done...

I don't know how BIS manages their Waypoints, though Somehow it has to be Possible to create a Waypoint. ???

If someone wants a File, it's 54KB big so I can't attach it...

-Fishion

Bremmer

  • Guest
Re:Crating Waypoints form Scratch
« Reply #9 on: 22 Aug 2002, 22:25:55 »
Very interesting idea.

From what I can gather only active sectors will need waypoints - the units in other sectors will be deleted right?
Therefore the total number of groups active at any one time will be much smaller than your total number of groups yeah?

No promises that you'll be able to get this to work, but it might be worth a try ->

Create a few empty groups (the maximum you expect to need at any one time) using the method Ottie suggested above.

Set out waypoints for these groups (it doesn't matter where they go just now - choosing the appropriate types might be difficult)

Sync a repeating switch type trigger to the first waypoint (v.important it is a switch type).

Now whenever a new sector becomes active you can assign units into one of the empty groups using the join command, specify where you want the waypoint placed using the setwppos command, and reset the waypoints to the first one in the wp path by activating the switch trigger.

You will obviously need a script for each sector that put units into groups, specifies wp positions and sets off the trigger, but technically I think its possible.

Cheers

Fishion

  • Guest
Re:Crating Waypoints form Scratch
« Reply #10 on: 23 Aug 2002, 00:45:37 »
So you say I create let's say 24 Guys in the Mission editor,
and give them waypoints. I can join guys into that group, and
they know the waypoints. Okay, but once I delete the Dead guys, I cannot do this again, since the waypoints are with the now Active guys...hmmmm of course unless I replace the dead
guys, with the leader of a group I have to remove...that might
be a way...

oh and I already have a script that puts in unit into each
Sector, and that detect that you go from one into the other
and removes and places units. That ain't hard, placing the
waypoints ain't neither.

Hey in the End Version the System is supposted, to even
handle how many guys are in one Sector, with reenforcements
and stuff...ahhhhh the good ol' JA2 times...

Thanks alot Bremmer that was the Idea I was waiting for ;D

-Fishion

whiplash2000a

  • Guest
Re:Crating Waypoints form Scratch
« Reply #11 on: 23 Aug 2002, 20:08:52 »
It is my sincerest hope that when you, Fishion, complete your mission or whatever you're working on with all this massive scale scripting, that you will share your technique with the rest of the community. I have been working on "spawning" units (not just vehicles) and making them move to the right place.

Your idea with populating the towns with civilians is genious. The game really needs this.

Good luck getting all this to work well.

Fishion

  • Guest
Re:Crating Waypoints form Scratch
« Reply #12 on: 23 Aug 2002, 23:51:19 »
Oh with time I will...
sooner or later I will post a Beat of the System, and with that
everybody should be able to copy my files...well doesn't mean
they'll know how to use it  ;D
But then somehow I doubt that too many people will be able
to do that anyhow

-Fishion