IPB


Welcome Guest ( Log In | Register )

 Forum Rules Forum Rules
 
Closed TopicStart new topic
> Armed Assault Scripting problem, Does a player loose its identity after death in MP?
harold5187
post Mar 2 2010, 18:12
Post #1


New Member
*

Group: Members
Posts: 1
Joined: 2-March 10
Member No.: 7,296



With Armed Assault I've encountered more scripting problems than I've had with Operation Flashpoint; Things that were easy in Flashpoint are very difficult in ArmA.

I have what I call my "Rearm" script, for use in MP missions. And what this is, is basically, 2 triggers on the map, executed repeatedly on condition of:

Trigger1
Condition: ?(alive Player1)
onactiv: Player1 exec "P1Rearm01.sqs"
ondeact: Player1 exec "P1Reset.sqs"

Trigger2
Condition: ?(alive Player2)
onactiv: Player2 exec "P2Rearm01.sqs"
ondeact: Player2 exec "P2Reset.sqs"

P1Rearm01.sqs
if not local server exit...

_Unit=player;
if unit == Player2 then get da heck outta here...

otherwise perform the following actions for Player1 only

P1Id1 addaction "give me this weapon", "P1Weap01.sqs";
P1Id2 addaction "give me another weapon", "P1Weap02.sqs";

then exit normally...

P2Rearm01.sqs
if not local server exit...

_Unit=player;
if unit == Player1 then get da heck outta here...

otherwise perform the following actions for Player2 only

P2Id1 addaction "give me this weapon", "P2Weap01.sqs";
P2Id2 addaction "give me another weapon", "P2Weap02.sqs";

then exit normally...

P1Reset.sqs
removeaction P1Id1;
removeaction P1Id2;
removeaction ...
exit

P2Reset.sqs
removeaction P2Id1;
removeaction P2Id2;
exit

This is the jest of my script, and all it does is adds some middle mouse options during MP gameplay for both Player1 and Player2....

What is supposed to happen is that after we die the script executes over and over again for Player1, and Player2, but what really happens, is that the engine alternates, as if it is deciding who it wants to have weapons, and who has none at all... Sometimes it works for the first few deaths, but then it stops working, and kicks back in moments later. Its not fluid, meaning, doesn't happen every time one of us die in MP...

Does our character loose its identity after it dies, hense the script doesn't know who Player1 and Player2 is, or is the script not executing on the other computer. Another problem with this script is, that when standing over a dead body I get double the options in my middle mouse button. (Unless I put the code):

_Unit=player;
if player=="Player1" then exit;

But that causes another problem, it solves the problem of Player2 getting player1's options when standing over their dead bodies, but if I stand over my own dead body, then I get the options again, after the Reset scripts crash out... I suppose we are dying faster than the game can keep up with the scripts?

Any help or advice would be appreciated.... All I want is to have the middle mouse options for the options I want, to be available no matter how many times Player1, or Player2 dies in MP... Is this even possible in MP game mode?

Another problem I'm having is the stupid AI do not obey in MP... I give them waypoints and cycle commands, which they
perform very well for the first few times, then they just sit around at their respawn point doing nothing, no longer going to their waypoints, do their identities get lost, hense leaving their new selves in a big world with nothing to do?

This is very frustrating... I've created a lot of missions for Operation Flashpoint including my rearm scripts, bulletcam, but these things are very difficult in ArmA... I have extended event handlers in my addon directory as well.

I suppose my main problem is identities, as well as what data needs to be executed on my Server and what data needs to be executed on my friends computer. Anyway, I would appreciate your thoughts, and forgive me for the blabbing, and the psudo code, as my scripts are as long as my ramblings, so I just gave you the jest of what they perform!

thankyou very much for your time...

Sincerely

Harold McBroom

harold5187@hotmail.com

This post has been edited by harold5187: Mar 2 2010, 18:19
 
Quote Post
MNBVCXZASDFGHJKL
post Mar 6 2011, 23:10
Post #2


New Member
*

Group: Members
Posts: 3
Joined: 5-March 11
Member No.: 8,826



If it is that and their identity is changing then do this.
QUOTE
class CfgIdentities
{
class John_Doe
{
name = "John Bartholemew Doe";
face = "Face20";
glasses = "None";
speaker = "Dan";
pitch = 1.0;
};
};

Now that you've changed different variables you must activate the identity within ArmA. Double click on the unit who will be using the identity and type in the init field: this setIdentity "John_Doe";
The "John_Doe" comes from the "class John_Doe" that is configured in the Description.ext file. If the "John_Doe" in the Description.ext file is changed then make sure to change the "John_Doe" in the init field.

Hope this helps.

This post has been edited by MNBVCXZASDFGHJKL: Mar 6 2011, 23:11
 
Quote Post
D@V£
post Mar 7 2011, 02:24
Post #3


Gee, I wish we had one of them doomsday machines.
Group Icon

Group: Moderators
Posts: 2,037
Joined: 13-November 06
From: Wales
Member No.: 155



Let's not dig up year old threads, shall we?

Closed.


--------------------
The Rules - Nothing too complicated, follow these and we'll have no problems.
Moderation Feedback Thread - Tell everyone how much you hate me love me secretly fear that Mark is watching you while you sleep. secretly wish that Mark is watching you while you sleep.
Site Issues Thread - Complain about site issues here. We might even fix them!
Community Chatter Thread - Furthest Mud-sling gets a free subscription to "JdB Monthly".

QUOTE(Major Mike Shearer)
We can categorically state that we have not released man-eating badgers into the area.
QUOTE(Brace Belden)
A machine gun is like a woman, I donít understand it, Iím afraid of it, and one day Iíll accidentally be killed by one.
 
Quote Post

Closed TopicStart new topic
3 User(s) are reading this topic (3 Guests and 0 Anonymous Users)
0 Members:

 



Lo-Fi Version Time is now: 22nd July 2018 - 09:23