Home   Help Search Login Register  

Author Topic: detect if player did it  (Read 3631 times)

0 Members and 2 Guests are viewing this topic.

Offline 456820

  • Contributing Member
  • **
detect if player did it
« on: 04 Jun 2005, 14:39:13 »
im trying to simulate a court martial by using an event handler killed on all the superior officers and since in a killed event handler _this selcet 1 is the person who did it.
So how can i check if _this select 1 is the player ?

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:detect if player did it
« Reply #1 on: 04 Jun 2005, 15:34:33 »
pffft...

? _this select 1 == player: goto "court_martial"
« Last Edit: 04 Jun 2005, 15:35:01 by HateR_Kint »
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline 456820

  • Contributing Member
  • **
Re:detect if player did it
« Reply #2 on: 04 Jun 2005, 15:35:32 »
i tried that but it didnt work anyway ill try it again
thanks

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:detect if player did it
« Reply #3 on: 04 Jun 2005, 15:45:39 »
???
That's odd...
Works just fine here...
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline 456820

  • Contributing Member
  • **
Re:detect if player did it
« Reply #4 on: 04 Jun 2005, 15:50:14 »
well im having a go now but its going to take a while to get all the scripts right again cause i deleted them lol
anyway cheers

Offline 456820

  • Contributing Member
  • **
Re:detect if player did it
« Reply #5 on: 04 Jun 2005, 16:06:27 »
YAY it did work i must of done something wronf last time anyway now my resource wont show up ill post it up here to save opeing a new thread
this is the description.ext

Code: [Select]
class SolidPicture
{
   type=0;
   idc=-1;
   style=48;
   colorBackground[]={0,0,0,0};
   colorText[]={1,1,1,};
   font="tahomaB24";
   size=0;
};
class RscTitles
{
class Court
   {
      idd=-1;
      movingEnable=0;
      duration=999;
      name="Court";
      controls[]={"Court"};
      class CourtMartial: SolidPicture
      {
         text="court.jpg";
         x=0.000000;
         y=0.000000;
         w=1.000000;
         h=0.15000;
      };
   };
};

note - i changed the line wich should have court.paa to court.jpg becuase the file i used is a jpg and i dont have a tool to convert the jpg into a paa
is there anything wronf in the file ?

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:detect if player did it
« Reply #6 on: 04 Jun 2005, 16:10:00 »
Ummmmm........you don't have a control called Court.

controls[]={"Court"};


Planck
I know a little about a lot, and a lot about a little.

Offline 456820

  • Contributing Member
  • **
Re:detect if player did it
« Reply #7 on: 04 Jun 2005, 16:14:56 »
okay i tried that and it worked aprt rom it said the image isnt 2n how can i get it into 2n but the thing is if i do it wont fit in the space wich covers the you are dead text on the end dialog any suggestions

Also when i tried
? _this select 1 == player: goto "court_martial"
again i got this message
? _this select 1 ==|#| player  error zero divisor
does anyone know what that might be ?

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:detect if player did it
« Reply #8 on: 04 Jun 2005, 16:30:34 »
Your picture dimensions must be in powers of 2.

What are your dimensions......if they are not a power of 2 then change them.

Convert it to .tga first, then use Texview to make it .paa.


Planck
I know a little about a lot, and a lot about a little.

Offline 456820

  • Contributing Member
  • **
Re:detect if player did it
« Reply #9 on: 04 Jun 2005, 16:37:11 »
there 1086x76
but if i did change them to 2n it will go over the border and go into the screen wich wouldnt look to good also it might not go over the default 'you are dead' text but ill have a go
thanks

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:detect if player did it
« Reply #10 on: 04 Jun 2005, 16:41:02 »
Try 1024 X 64.

Then use this bit to male it fit the area you want:

 x=0.000000;
 y=0.000000;
 w=1.000000;
 h=0.15000;


Planck
« Last Edit: 04 Jun 2005, 16:44:55 by Planck »
I know a little about a lot, and a lot about a little.

Offline 456820

  • Contributing Member
  • **
Re:detect if player did it
« Reply #11 on: 04 Jun 2005, 16:42:37 »
how do i edit a picture's dimentions into 1024x64 then ?


Also when i tried it again i got this error
? _this select 1 == player: goto "court_martial"
again i got this message
? _this select 1 ==|#| player  error zero divisor
does anyone know what that might be ?

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:detect if player did it
« Reply #12 on: 04 Jun 2005, 16:45:48 »
Don't you have a picture program of some kind......like PSP?


Planck
I know a little about a lot, and a lot about a little.

Offline 456820

  • Contributing Member
  • **
Re:detect if player did it
« Reply #13 on: 04 Jun 2005, 16:52:17 »
ive now managed to get it to work fine except the picture looks alittle stretched what other dimensions wich are smaller wich will help unstreatch the pic

also that bug to check if the player killed the officer then ive done it

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:detect if player did it
« Reply #14 on: 04 Jun 2005, 16:53:53 »
Like I said above, use these:

 x=0.000000;
 y=0.000000;
 w=1.000000;
 h=0.15000;

To size and place it where you want on the screen.


Planck
I know a little about a lot, and a lot about a little.