Home   Help Search Login Register  

Author Topic: Putting Objects on Tables and Setting Sides  (Read 645 times)

0 Members and 1 Guest are viewing this topic.

Drozdov

  • Guest
Putting Objects on Tables and Setting Sides
« on: 25 Aug 2003, 11:50:35 »
How would I go about putting an object (such as a Radio) on a table? I could do with knowing the precise syntax since I have no real experience in this field  ::).

Also, is there anyway which I can set the Side of a unit? In the mission I'm doing you have to kill a group of police who are listed as civilians. You're in a three man (Resistance) group. However, I can't think of a way to make the rest of your group recognise them as enemies. I think they will actually attack you if you kill a whole bunch of police guys. So can I set the side of the police units to 'West' (Resistance are unfriendly to Americans in my mission) using a trigger? Or is there another trick I can do?

SheepOnMintSauce

  • Guest
Re:Putting Objects on Tables and Setting Sides
« Reply #1 on: 25 Aug 2003, 13:21:03 »
I think they attack you since killing civilians lowers your score, so couldn't you cancel out the negative score with a positive score when the police are killed?

Drozdov

  • Guest
Re:Putting Objects on Tables and Setting Sides
« Reply #2 on: 25 Aug 2003, 14:36:56 »
Are you sure it's connected to the Score? Well, I could sort that easy enough if it was. But that doesn't make my guys want to kill them...

SheepOnMintSauce

  • Guest
Re:Putting Objects on Tables and Setting Sides
« Reply #3 on: 25 Aug 2003, 15:22:15 »
I'm sure I read somewhere that if your score drops below a certain amount (-1000?) then you become renegade. Such as killing members of your own side or similar. So, if you could stop the score dropping then you wouldn't turn renegade and your side wouldn't shoot at you for killing civilians.

To make your guys shoot the civilians couldn't you force them to shoot those police? I'm sure they don't turn renegade since they don't have a score.  :P
« Last Edit: 25 Aug 2003, 15:23:21 by SheepOnMintSauce »

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re:Putting Objects on Tables and Setting Sides
« Reply #4 on: 25 Aug 2003, 15:58:57 »
;D Ah the memories...well young'uns, let ol' granpa Wolfrug give you a lesson in basic mission.sqm editing.

Basic info: the mission.sqm is the thing which stores all the shiznats of your mission - triggers, units, waypoints and their positions and so forthwith. When you Merge a mission, what you're basically doing is copying the mission.sqm of the other mission on top of your current one. The file is notepad friendly, and not at all dangerous ;D

The deal: Open the mission.sqm of your mission (found in the mission's folder) and you will be met with a huge list of everything. What you need to do is find the police men in question. You will be met with something like this:

Code: [Select]
class Item4
   {
   position[]={6198.226563,2.274771,9247.783203};
   azimut=270.000000;
   id=126;
   side="EAST";
   vehicle="sebnam_nvmedic";
   rank="CORPORAL";
   skill=0.333333;

The important thing here is the side line: just change this from "CIV" to "WEST", "EAST" or "GUER" depending on what side you want them to be on. Easy as that, really. Then save the mission.sqm and load your mission. You will now note that your soldiers will shoot at the policemen and they will return fire.  ;D
Note: do not try to open and edit anything on these modified units, or they WILL revert back to their "original" form. So make sure you've got all them names and init lines done and ready before you go editing the mission.sqm. Also note that you can copy & paste quite freely, so no need to go doing this on each and every one individually...

Any problems? Do share. :toocool:

Wolfrug out.
« Last Edit: 25 Aug 2003, 15:59:44 by Wolfrug »
"When 900 years YOU reach, look as good you will not!"

deaddog

  • Guest
Re:Putting Objects on Tables and Setting Sides
« Reply #5 on: 25 Aug 2003, 16:04:16 »
Sheeponmintsauce is right. Put this in the init lines (or from a script) of the civilians:

this addrating -10000

All sides will target any unit that has a negative rating.

LAPD

  • Guest
Re:Putting Objects on Tables and Setting Sides
« Reply #6 on: 25 Aug 2003, 16:26:24 »
How would I go about putting an object (such as a Radio) on a table? I could do with knowing the precise syntax since I have no real experience in this field  ::).

In the radio init. field write this:

Code: [Select]
This SetPos [getpos this select 0, getpos this select 1, (getpos this select 2)+ x]
Change the 'x' to a number which will be the hight in meters of the table. If you put 1.5, than it's hight will be one and half meters from the ground (and maybe the hight of the table :D).

Drozdov

  • Guest
Re:Putting Objects on Tables and Setting Sides
« Reply #7 on: 25 Aug 2003, 18:33:06 »
That should be me about sorted :toocool:. Thanks to LAPD... incidentally the height of a table is 0.8 metres in OFP  ;).

Wolfrug: help appreciated, didn't think of editing the mission.sqm file though I'm sure I'd have tried it eventually  ::). It isn't exactly perfect as I wanted the police to switch sides after a trigger had been activated (there's a little cutscene where the police challenge you before you go in and start massacring them) though with use of the "careless" mode and "never fire" it'll work fine.

I'd click the solved button but there's one thing I want cleared up...

Quote
All sides will target any unit that has a negative rating.

Ratings add to your score don't they? Therefore units with negative ratings will give you a negative score, like civilians or friendly units do. You sure you got that the right way around?

SheepOnMintSauce

  • Guest
Re:Putting Objects on Tables and Setting Sides
« Reply #8 on: 25 Aug 2003, 19:58:33 »
You get a negative rating for doing something that you shouldn't like shooting a team member or a civilian.  It deducts point from your score. Kill too many team members or civilians and your score will drop below, I think it's 1000 then you will be classed as a renegade.

I'm not sure if shooting a renegade civilian could make you a renegade as well though, you'd have to test it out. But you could always cancel out the negative rating if it does, and add to your score for each civilian killed, therefore you won't become a renegade and will gain points for doing the mission objective, or Wolfrug's method which I thought was pretty cool. :)