Home   Help Search Login Register  

Author Topic: stargate tester  (Read 4385 times)

0 Members and 1 Guest are viewing this topic.

Offline WizzyWig

  • Members
  • *
  • Mod Maker
    • Oblivion Promotions
stargate tester
« on: 14 Apr 2003, 10:41:42 »
http://projectstargate.cjb.net/ go to downloads and it is the two part rar download and read the readme

now the problem i have is with the scripts thay are find in single player but in mulitplayer when i open the gate i go fine but when ever someone else opens the gate the opf engin put me back at the gate but only some times. so realy im asking for help with script and mission triger i think whats the problem is i need to make a user list for all the units that are going to use the gate ive sean a list thing some were before but im unable to locate the mission if you can help download the files and have a go with the scripts now the scripts also in this mission are all maid by me but addons are not so read the readme because i gave credit to all

thanks for the help
« Last Edit: 14 Apr 2003, 10:42:09 by wizzywig »

Offline WizzyWig

  • Members
  • *
  • Mod Maker
    • Oblivion Promotions
Re:stargate tester
« Reply #1 on: 14 Apr 2003, 11:31:39 »
sorry didnt say what scripts do:

Portal1.sqs
PlayMusic "open"; Door1 SetPos (Getpos Gate1); gate1 animate ["watergate", 1]; gate2 animate ["watergate", 1]

~2
PlayMusic "open2";

~10
gate1 animate ["watergate", 0]; gate2 animate ["watergate", 0]; Door1 SetPos (Getpos Post)


PlayMusic "open"

this opens portal2.sqs and turns on the jump
Portal2.sqs

Door2 SetPos (Getpos Gate2); gate2 animate ["watergate", 1]; gate1 animate ["watergate", 1]

~10
gate2 animate ["watergate", 0]; gate1 animate ["watergate", 0]; Door2 SetPos (Getpos Post)

this one is just to creat the water effect

hope this helps

Offline WizzyWig

  • Members
  • *
  • Mod Maker
    • Oblivion Promotions
Re:stargate tester
« Reply #2 on: 14 Apr 2003, 12:00:50 »
also is it posible to add a timer on the screen to show that you have 10 seconds then 9 seconds 8 sec and so on basicly just a countdown from 10-1

Offline uiox

  • Contributing Member
  • **
Re:stargate tester
« Reply #3 on: 14 Apr 2003, 13:02:41 »
 8)
« Last Edit: 16 Apr 2003, 23:35:36 by uiox »

Offline WizzyWig

  • Members
  • *
  • Mod Maker
    • Oblivion Promotions
Re:stargate tester
« Reply #4 on: 14 Apr 2003, 13:43:12 »
testing idear

Offline WizzyWig

  • Members
  • *
  • Mod Maker
    • Oblivion Promotions
Re:stargate tester
« Reply #5 on: 14 Apr 2003, 14:05:41 »
I don't really understand what you want, I think you have this sequence :

Start the portal --- > animation
Jump player somewhere.

For a MP use you need to play animation on all clients and the setpos on server only.
So :


In the config.cpp of your addon:
Transform your portal like a vehicle for have the possibility of set the engine to on.
Use the init event and start a script in it it will be only start on server side for create the jump of the portal or player.
Use the event engine for start anim on all clients.
And a useraction for start the portal add to the portal

Config :
Code: [Select]
class eventhandlers

      {
      init = "[_this select 0] exec ""\Stargate\Initserver.sqs"";"
      engine = " [_this select 0] exec ""\Startgate\Anim.sqs"";"
      };
class UserActions
      {
         class StartPortal
         {
            displayName="Portal on";
            position="PortalOn";
            radius=10;
                                         condition="!(isengineOn this)";
            statement=" this engineon true";            
         };

      };

initserver.sqs
Code: [Select]

_Portal = _this select 0
#start
@isengineon _portal
~timeofanimation
_portal setpos [pubVarSomewhereX,pubVarsomewhereY,pubvarsomewherez]
_Portal engineon false
If (alive _portal) then {goto "start"}


Anim.sqs

Code: [Select]

_Portal = _this select 0
_Portal animate ["watergate", 0];



I don't test your addon your mission and this scripts but the method may work...


Offline WizzyWig

  • Members
  • *
  • Mod Maker
    • Oblivion Promotions
Re:stargate tester
« Reply #6 on: 14 Apr 2003, 14:07:19 »
wont let me in the game just jumps to desktop

Code: [Select]
//   STARGATE by PROJECT STARGATE MOD  http://stargatemod.unitedgaming.net/
//   This addon for Operation Flashpoint is freeware. Not interelly tested. Use it at your own risk.
 
//   Skinning by Addonman - Mig
//   O2 Coding and config by Addonman - Mig
//   Version 1.0 (Alpha)


// some basic defines
#define TEast 0
#define TWest 1
#define TGuerrila 2
#define TCivilian 3
#define TSideUnknown 4
#define TEnemy 5
#define TFriendly 6
#define TLogic 7

#define true 1
#define false 0

// type scope
#define private 0
#define protected 1
#define public 2


class CfgPatches
{
   class stargate
   {
      units[] = {stargate};
      weapons[] = {};
      requiredVersion = 1.01;
   };
};
class CfgVehicles
{
   class All {};
   class Static: All {};
   class Building: Static {};
   class NonStrategic: Building {};
   class Fence: NonStrategic {};
   class FenceWood : Fence {};
   class Strategic : Building {};
   class Shed: Strategic {};
   class Barracks: Shed {};
   class ShedSmall : Shed {};
   class stargate : Barracks
   {   
      side = TCivilian;
      vehicleClass="Objects";
      icon="\stargate\stargateicon";
      model="\stargate\stargate.p3d";
      armor=20000;
      scope=2;
      displayName="stargate";
            simulation="house";
      mapSize = 16;
animated=1
      class Animations
      {
         class watergate
         {
            type="rotation";
            animPeriod=0.0001;
            selection="watergate";
            axis="osa_watergate";
            angle0=0;
            angle1=3.14;
         };
class eventhandlers
      {
      init = "[_this select 0] exec ""\Stargate\Initserver.sqs"";"
      engine = " [_this select 0] exec ""\Startgate\Anim.sqs"";"
      };
class UserActions
      {
         class StartPortal
         {
            displayName="Portal on";
            position="PortalOn";
            radius=10;
            condition="!(isengineOn this)";
            statement=" this engineon true";            
         };

};

I don't really understand what you want, I think you have this sequence :

Start the portal --- > animation
Jump player somewhere.

For a MP use you need to play animation on all clients and the setpos on server only.
So :


In the config.cpp of your addon:
Transform your portal like a vehicle for have the possibility of set the engine to on.
Use the init event and start a script in it it will be only start on server side for create the jump of the portal or player.
Use the event engine for start anim on all clients.
And a useraction for start the portal add to the portal

Config :
Code: [Select]
class eventhandlers

      {
      init = "[_this select 0] exec ""\Stargate\Initserver.sqs"";"
      engine = " [_this select 0] exec ""\Startgate\Anim.sqs"";"
      };
class UserActions
      {
         class StartPortal
         {
            displayName="Portal on";
            position="PortalOn";
            radius=10;
                                         condition="!(isengineOn this)";
            statement=" this engineon true";            
         };

      };

initserver.sqs
Code: [Select]

_Portal = _this select 0
#start
@isengineon _portal
~timeofanimation
_portal setpos [pubVarSomewhereX,pubVarsomewhereY,pubvarsomewherez]
_Portal engineon false
If (alive _portal) then {goto "start"}


Anim.sqs

Code: [Select]

_Portal = _this select 0
_Portal animate ["watergate", 0];



I don't test your addon your mission and this scripts but the method may work...


Offline WizzyWig

  • Members
  • *
  • Mod Maker
    • Oblivion Promotions
Re:stargate tester
« Reply #7 on: 14 Apr 2003, 14:09:28 »
Code: [Select]
_portal setpos [pubVarSomewhereX,pubVarsomewhereY,pubvarsomewherez]

can this part be set to jump to were the gate is so you dont have to set up points and limmit the easy of use of this mod

Offline uiox

  • Contributing Member
  • **
Re:stargate tester
« Reply #8 on: 14 Apr 2003, 14:17:32 »
 8)

« Last Edit: 16 Apr 2003, 23:35:59 by uiox »

Offline uiox

  • Contributing Member
  • **
Re:stargate tester
« Reply #9 on: 14 Apr 2003, 14:25:48 »
If I understand you have two portals, so you create two addons with in init for each only a global variable for the pos of the portal

init portal 1

_Portal = _this select 0
GlobPosPortal1 = getpos _portal

initportal2
_Portal = _this select 0
If  (format ["%1", GlobPosPortal1  ] == "scalar bool array string 0xfcffffef")  then { hint "You need a receive portal"; exit}

#start
@isengineon _portal
~timeofanimation
_portal setpos GlobPosPortal1
_Portal engineon false
If (alive _portal) then {goto "start"}

Note you don't need publicvariable cause you do all the job on server side....
« Last Edit: 14 Apr 2003, 14:30:31 by uiox »

Offline WizzyWig

  • Members
  • *
  • Mod Maker
    • Oblivion Promotions
Re:stargate tester
« Reply #10 on: 14 Apr 2003, 14:41:45 »
could you download the files modify them and send it back please

Offline uiox

  • Contributing Member
  • **
Re:stargate tester
« Reply #11 on: 14 Apr 2003, 14:51:30 »
 8)
« Last Edit: 16 Apr 2003, 23:36:28 by uiox »

Offline WizzyWig

  • Members
  • *
  • Mod Maker
    • Oblivion Promotions
Re:stargate tester
« Reply #12 on: 14 Apr 2003, 15:42:14 »
the script need to activate both gates animations but only one side portal open and outher gate set to recive the person but the config is naf as stargate water window is faceing down and not centered please help  

the gates need to be called Gate1 and Gate2

http://www23.brinkster.com/projectstargate/www/Downloads/Stargate1test.pbo

copy link to new browser
« Last Edit: 14 Apr 2003, 15:45:42 by wizzywig »

Offline uiox

  • Contributing Member
  • **
Re:stargate tester
« Reply #13 on: 14 Apr 2003, 16:42:26 »
 8)
« Last Edit: 16 Apr 2003, 23:36:56 by uiox »

Offline WizzyWig

  • Members
  • *
  • Mod Maker
    • Oblivion Promotions
Re:stargate tester
« Reply #14 on: 14 Apr 2003, 18:45:58 »
i still need the jump from gate one to gate two script implanted in the addon so all players need do is to put two gates down one called gate1 and one called gate2

when one gate opens 2 second later the outher gate opens createing a worm hole effect look at my mission just unpbo and have a look how i set that up and try to modify it for me so that i works