Home   Help Search Login Register  

Author Topic: move a ammo crate  (Read 820 times)

0 Members and 1 Guest are viewing this topic.

Panther

  • Guest
move a ammo crate
« on: 31 Dec 2004, 12:14:11 »
hey all i want to move a ammocrate or object with a trigger how can i do this ?

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:move a ammo crate
« Reply #1 on: 31 Dec 2004, 13:49:45 »
Give it a name say ammocrate1

ammocrate1 setPos placeyouwantittomoveto

eg

ammocrate1 setPos getPos  makername

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:move a ammo crate
« Reply #2 on: 31 Dec 2004, 16:23:31 »
if its a marker, it should be setpos getmarkerpos marker

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:move a ammo crate
« Reply #3 on: 31 Dec 2004, 20:09:54 »
Quite right.  Silly of me.

Dubieman

  • Guest
Re:move a ammo crate
« Reply #4 on: 31 Dec 2004, 22:23:49 »
Why are we using markers? Is there any positive effects to using markers? :-\

I always use game logics or getpos units/vehicles. :P

Well I use markers only if needed. :P

Rokket

  • Guest
Re:move a ammo crate
« Reply #5 on: 01 Jan 2005, 02:44:23 »
To reduce units I use map objects whenever possible. Sometimes you can't, obviosuly. Great for creating units on the fly.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:move a ammo crate
« Reply #6 on: 02 Jan 2005, 22:00:17 »
If I'm moving something to a known place I find out the coordinates of the location and teleport directly there, not using (in the live mission) a marker or GL at all.   Alternatively, you can use an object position with or without an offset.     It all helps if you are having lag issues.

I've never discovered the answer to the GL/marker question, I mean as to which is better as a location placefinder.     I suspect a marker is better for lag (since it does not create a group) but I don't actually know.    
Plenty of reviewed ArmA missions for you to play

Dubieman

  • Guest
Re:move a ammo crate
« Reply #7 on: 07 Jan 2005, 03:02:43 »
We can group markers to people, does that do anything lagwise, I remember you telling us that after disecting the Take the Car Mission... :P

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:move a ammo crate
« Reply #8 on: 07 Jan 2005, 09:44:42 »
:P
Oh, I just have to.... ;D

A single unit is a group...
That's why you can't have more than 62 (or was it 64 ::) ) single units on one side... But, you can have 62 12 men groups on one side...

Gamelogic inherits from the vehicle classes like all vehicles in OFP (houses, men, etc...) but what makes it different is that it uses no model and simulation="invisible"...
So it will most likely add a bit more lag than markers which are not based on the vehicle classes...

Code: [Select]
   class Groups
   {
      class Item1
      {
         side="LOGIC";
         class Vehicles
         {
            items=1;
            class Item0
            {
               position[]={10074.839844,26.730000,3886.240479};
               id=1;
               side="LOGIC";
               vehicle="Logic";
               leader=1;
               skill=0.600000;
               text="gl";
            };
         };
      };
   };

Code: [Select]
   class Markers
   {
      items=1;
      class Item0
      {
         position[]={10014.039063,26.730000,3908.639893};
         name="markkr";
         type="Flag";
      };
   };

So based on those exerpts a group adds at least twice as much information than a marker so based on that the game logic could add lag...

Grouping a unit into a marker gives this addition to the units definitions:
Code: [Select]
markers[]=
    {
          "markkr"
    };
And the more the markers you group into the more markernames are in that markers array...
So what OFP engine most likely does is to calculate a random index from the amount of elements in that array and pick one for a position for the unit to be created upon mission initalisation...
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:move a ammo crate
« Reply #9 on: 07 Jan 2005, 23:59:47 »
I've never discovered the answer to the GL/marker question, I mean as to which is better as a location placefinder.     I suspect a marker is better for lag (since it does not create a group) but I don't actually know.    

I tend to lean toward using the object command... eg:

unit setpos [(getpos object 1234 select 0) + 50, (getpos object 1234 select 1) - 15, 0]

No cpu time consumed for markers or logics ;)
« Last Edit: 08 Jan 2005, 00:01:16 by Sui »

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:move a ammo crate
« Reply #10 on: 08 Jan 2005, 00:49:50 »
this has gotten way off the original topic.....