Forum Jump :

Author Message


Posts: 28
Rank:


Level: Member

Country: uk
Location:
Occupation:
Age:
In-game name:

 
#1 Posted at 2016-01-02 23:55        
     
I am making a mission that is basically a training exercise. i am looking for some way that when the player is 'hit' (not killed as allowdamage false is in effect) a hint displays tell the player had it been real combat they were just shot. However i cannot get this to work. if there is some other way to do it, i would appericiate it if you told me. i would prefer if i could do this in the init of the player, but am ok with making an .sqf script.


Author Message


Posts: 1589
Rank:


Level: Member

Country: pf
Location: Tahiti
Occupation: too many Arma
Age: 57
In-game name: Kobayashi Maru

 
#2 Posted at 2016-01-03 07:51        
     
There are 2 demands in your question.
1. you don't want the player be killed as in "combat", so do you want to make an exercise hit system?
2. you want to hint something but you don't say if you're in SP or MP mission.


in init field:
if !(isServer) exitwith {};
this addEventHandler ["HandleDamage", {
"You'll be dead in real combat" remoteExec ["hint",_this select 0]
}]

See more explanation here and here

This post was edited by Pierre MGI (2016-01-03 08:09, 659 days ago)

PLEASE CONTACT ME ON BI FORUMS FOR ANY SCRIPT / MOD QUESTION. TKS

Advertisement


Author Message


Posts: 1189
Rank:


Level: Member

Country: tr
Location:
Occupation: Computer Science student
Age: 20
In-game name: Wak

 
#3 Posted at 2016-01-03 09:42        
     
Why the remoteExec, couldn't you do something like this?
if (local this) then {
	this addEventHandler ["HandleDamage", {
		hint "You were just hit! If tis was real combat... You know...";
		0;
	}];
};

This should also revert the damage back to 0, so no allowDamage false should be necessary.

This post was edited by 654wak654 (2016-01-03 09:49, 659 days ago)

Sometimes I like to think as I started the whole "earplugs" thing.

W0lle: The only advice I can give you is: Do not try to understand BI. You will not succeed and it only makes your brain go boom. I would even go so far and say that not even they understand their own actions :-D.

#define getDamage getDammage