Big Problem Fixed, Yahoo!!

More
19 years 11 months ago #9952 by Shane
Replied by Shane on topic Big Problem Fixed, Yahoo!!

Any suggestions on a name for it on the X-Wing?

Yes. The Infanto Ray. :p

Okay, okay... just kidding. :D It was a favorite arcade game long, long ago.



<font size="1"><font face="Book Antiqua"><font color="black">"Never before in the history of the world had such a mass of human beings moved and suffered together. This was no disciplined march; it was a stampede-- without order and without a goal, six million people unarmed and unprovisioned, driving headlong. It was the beginning of the rout of Civilisation... of the massacre of Mankind."
--H. G. Wells The War Of The Worlds</font id="black"></font id="Book Antiqua"> </font id="size1">

Please Log in or Create an account to join the conversation.

More
19 years 11 months ago #9957 by MajorTom
Replied by MajorTom on topic Big Problem Fixed, Yahoo!!
Ok, it's working now. (but I'm still not completly happy with it)

When you open the wings, guns are added (in fact the first one added even pops up as the selected weapon (instead of the "Infanto Ray", which is selected as you enter the game).
You can cycle through the weapons (where unfortunatly the "Infanto Ray" can still be selected). They all fire correctly and inflict the correct damage on targets.

When you close the wings the guns are removed and the "Infanto Ray" pops back up as selected. Now here is the wierd thing that bothers me: You suddenly have 2 "Infanto Ray"s one of which can't be fired.
(I think this has to do with the weapon linking)

If you open the wings again, everything is as above again (except the second "Infanto Ray" disappears and the remaining one is triggerable

All subsequent cycles run as above, (i.e. nothing changes obnoxiously in any given status)

The Result is when your ship is in battle mode with open wings, you have 3 weapons you can cycle through, that all fire correctly (one of which is "Infanto Ray").

Meanwhile, I've decided on a name for the "Infanto Ray" which helps us out of this predicament to an extent: The weapon gets no name! The text field will be simply blank.
Thus you see the weapon energy status bar but no name of a weapon (and therefore "see" that none is selected). And, when you press the trigger you'll see no bolt and hear no sound.

The remaining issue is, "no name Infanto Ray" will still be a selectable weapon when you cycle through the weapons.
(unless I can somehow manage to remove it whenever the wings are opened without the darn game crashing)

The real grief here is that some of the funtions I'm using are undocumented iMultiplay functions that don't always 'work' because they have unknown dependencies (you just have to guess at them and try it out until it works).

Iwar2 Multiplayer Fan Site

Please Log in or Create an account to join the conversation.

More
19 years 11 months ago #9977 by MajorTom
Replied by MajorTom on topic Big Problem Fixed, Yahoo!!
It's fixed!
The problem is the call to release the weapons on the server only. Not on the client! O Joy! We have a solution!

Normally you have to transmit everything a client does to the server app, copy the event and then send the information on to the other clients so they can copy it as well. Thats not necessary however, when the client fires a weapon, because the event is transmitted via the iMultiplay package and not via the multiplayer script.
i.e, visually speaking: When iMultiplay says "client has fired" the server fires it's own identical weapon in it's instance of the game at the same target the client fired at.

Therefore ist is fully sufficient to lock the guns down on the client only. (because if teh client can't fire, iMultiplay cannot transmit the "HasFired" event.)

Apparently, if you lock down the weapons and then release them on the server app, it gets screwed up and fires the gun constantly, because it interprets the command as "fire" and never recieves an input that the simulated weapon being used in the server instance of the game should stop fireing. (even though the client has long since stopped fireing)!

LOL, Sometimes you can make your own Problems. Aparently, on my previous scripts, I had either unintentionally left the commands out of the server app or just didn't notice the effect. Anyhow, It's fixed now!

Now, on a side note to document something about creating weapons dynamically in the MP Game: It is nearly impossible to refurbish a ship dynamically
I've been struggling for 3 days and nights, trying to make weapons dynamically by adding subsims, trying to make weapons dynamically by using power up, Trying to add weapon subsims in the traditional way. Pulling my hair out, being totaly disappointed and agravated cause nothing worked repeatably. The functionality is intended to add weapons but not to remove them (except when the player ship is killed)

Problem is, the MP game adds weapon links to the weapons at will, Regardless if you unlink the weapons before you add new ones or not.
The linking also appears to link randomly But, the function notices this and just adds more links without removing the old. thats why you get weapons that don't work (sometimes). Also you cannot add more than 2 of any type of weapon, and additionally you have to have exactly the same amount of weapons mounted on your ship when you join as you add to it later.

Whats cool though and possibly very useful is the functionality to increase your missile count. Why? because normally when a player is killed and respawns he gets a full compliment of ammo based weapons and missiles. Using tha add missile functionality, we can have him respawn with the same number of missiles (or ammo) he had when he died! (except if he died with 0 he would (have to) get 1 when he respawns)





Iwar2 Multiplayer Fan Site

Please Log in or Create an account to join the conversation.

More
19 years 11 months ago #9987 by Second Chance
Very cool! Another MP problem bites the dust.

mailto:second_chance@cox.net
The Ultimate Guide To Modding: I-War 2 - Edge Of Chaos (on hold during SW MP mod)
cartoons.sev.com.au/index.php?catid=4
.

Please Log in or Create an account to join the conversation.