I'm making a mod where you can open and close a parachute with a hotkey.
It works, but when I test it in multiplayer, sometimes it closes the other person's parachute instead.
The client cog:
and in the parachute cog:
activated:
ID = 23;
SendTrigger(-1, ID, player, 0, 0, 0);
stop_power:
ID2 = 45;
SendTrigger(-1, ID2, player, 0, 0, 0);
I think the problem is from the DestroyThing. Anyone know how to fix it?
[This message has been edited by IDJunkguy (edited July 07, 2001).]
It works, but when I test it in multiplayer, sometimes it closes the other person's parachute instead.
The client cog:
Code:
flags=0x404 symbols thing player local template parachute=+parachute local int theguy local int thesector local int theposition local int thechute local message trigger end #---------- code trigger: if (GetSourceRef() == 23) { theguy = GetParam(0); thesector = GetThingSector(theguy); theposition = GetThingPos(theguy); thechute = CreateThingAtPosNR(parachute, thesector, theposition, '0 0 0'); AttachThingToThingEx(thechute, theguy, 0x8); } else if(GetSourceRef() == 45) { DestroyThing(thechute); } return; end
and in the parachute cog:
activated:
ID = 23;
SendTrigger(-1, ID, player, 0, 0, 0);
stop_power:
ID2 = 45;
SendTrigger(-1, ID2, player, 0, 0, 0);
I think the problem is from the DestroyThing. Anyone know how to fix it?
[This message has been edited by IDJunkguy (edited July 07, 2001).]