Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
3 registered members (AndrewAMD, The_Judge, Grant), 898 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
jumping on a weapon #121589
04/05/07 08:56
04/05/07 08:56
Joined: Jan 2007
Posts: 13
D
DXR89 Offline OP
Newbie
DXR89  Offline OP
Newbie
D

Joined: Jan 2007
Posts: 13
i use my.enable_impact for my weapon.but when i jump on it,the function doesnt start.what should i do?

Re: jumping on a weapon [Re: DXR89] #121590
04/05/07 11:03
04/05/07 11:03
Joined: Aug 2006
Posts: 128
Papua New Guinea
I
Impaler Offline
Member
Impaler  Offline
Member
I

Joined: Aug 2006
Posts: 128
Papua New Guinea
You should use either enable_entity or c_trace to detect another object jumping on it. In your event function, script
Code:
  

if(event_entity == 1)
{
weaponfunction();
}




Murphey's Law:
<< if anything can go wrong, it will >>

(Murphey was an optimist).
Re: jumping on a weapon [Re: Impaler] #121591
04/05/07 14:14
04/05/07 14:14
Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
Xarthor Offline
Expert
Xarthor  Offline
Expert

Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
Impaler is right, kind of.
Best is to use both enable_impact and enable_entity:
Code:

if(event_type == event_impact || event_type == event_entity)
{
//do your stuff here
}



However if you already use a c_trace in the player's movement action (for gravity), then you could set the c_trace flag 'ACTIVATE_SONAR' and use the event_sonar to detect the player.
But this will also pick up the weapon if the player just jumps over it, so you may use the mentioned event_entity and event_impact.

Re: jumping on a weapon [Re: Xarthor] #121592
04/05/07 18:23
04/05/07 18:23
Joined: Jan 2007
Posts: 13
D
DXR89 Offline OP
Newbie
DXR89  Offline OP
Newbie
D

Joined: Jan 2007
Posts: 13
thanks!


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1