OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: WizzyWig 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
-
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
-
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
-
8)
-
testing idear
-
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 :
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
_Portal = _this select 0
#start
@isengineon _portal
~timeofanimation
_portal setpos [pubVarSomewhereX,pubVarsomewhereY,pubvarsomewherez]
_Portal engineon false
If (alive _portal) then {goto "start"}
Anim.sqs
_Portal = _this select 0
_Portal animate ["watergate", 0];
I don't test your addon your mission and this scripts but the method may work...
-
wont let me in the game just jumps to desktop
// 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 :
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
_Portal = _this select 0
#start
@isengineon _portal
~timeofanimation
_portal setpos [pubVarSomewhereX,pubVarsomewhereY,pubvarsomewherez]
_Portal engineon false
If (alive _portal) then {goto "start"}
Anim.sqs
_Portal = _this select 0
_Portal animate ["watergate", 0];
I don't test your addon your mission and this scripts but the method may work...
-
_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
-
8)
-
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....
-
could you download the files modify them and send it back please
-
8)
-
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 (http://www23.brinkster.com/projectstargate/www/Downloads/Stargate1test.pbo)
copy link to new browser
-
8)
-
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
-
8)
-
8)
-
looks good bit strange about spin effect how do you change the axis of the water effect ---0---
me need help with the drag bit that drags you tho the gate i need it to be universal so all units can use it to get back as well please thanks for all this help it looks great and i know if we sort this out then people can read and learn as all that has bean typed on here hope you can help more to sort out the problems
-
8)
-
the problem was not the water effect its the jump effect the fact is that all i wont the gate to do is let me travel and then outhere travel but not get pulled back all the time
-
8)
-
I don't underst and sorry, Im french so I flee
uiox out out really fory our problem may be some proud and good guy of the best nations not from rat nation
PS it's not Gaelic
///
-
8)
-
uiox not exist, wait for other...
-
can any one help me
pic after uiox
-
many,many, many , scripters can help you.