Raised This Month: $12 Target: $400
 3% 

[TUT] Touch Stuff


Post New Thread Reply   
 
Thread Tools Display Modes
P34nut
AMX Mod X Beta Tester
Join Date: Feb 2006
Location: Netherlands
Old 03-20-2007 , 14:49   Re: [TUT] Touch Stuff
Reply With Quote #21

Doesnt he need to change the velocity to zero?
__________________
All you need to change the world is one good lie and a river of blood
P34nut is offline
Ryu2877
Member
Join Date: Sep 2006
Location: China
Old 03-21-2007 , 02:28   Re: [TUT] Touch Stuff
Reply With Quote #22

Quote:
public plugin_init() {
register_plugin("Nadepassing", "1.00", "MaTTe");
PlasmaNades = register_cvar("plasmagrenades", "1");
register_touch("func_wall", "grenade", "hegrenade_touch");
}

public hegrenade_touch(touched, toucher) {
if(get_pcvar_num(PlasmaNades)) {
new model[99]
entity_get_string(toucher, EV_SZ_model, model, 98);

if(equal(model, "models/w_hegrenade.mdl")) {
entity_set_int(toucher, EV_INT_solid, SOLID_NOT);
}
}
}
I think "solid" cannot been changed by a entity which has setted it's "solid"-value generally. you may change "movetype" just like VEN said, not "solid".

And in your case, if you want grenade through fraise, you had better create a fake grenade instead the ture one, set same "velocity" & "gravity"... etc, but different "solid".
Ryu2877 is offline
Ryu2877
Member
Join Date: Sep 2006
Location: China
Old 03-21-2007 , 02:35   Re: [TUT] Touch Stuff
Reply With Quote #23

And about "register_touch",
Quote:
Syntax:

register_touch ( Toucher[], Touched[], function[] )
Ryu2877 is offline
nick123
BANNED
Join Date: Dec 2006
Old 04-11-2007 , 12:51   Re: [TUT] Touch Stuff
Reply With Quote #24

mateo a better way i like is deleting the grenade when it touchs the wall, and gettin it origin then creating a new one from scratch.. then u will be able totaly control it.
nick123 is offline
Basic-Master
Veteran Member
Join Date: Apr 2005
Location: hello pm
Old 04-14-2007 , 17:16   Re: [TUT] Touch Stuff
Reply With Quote #25

small hint: don't use "new" in forwards, especially not in touch because that one is usually called even oftener than ServerFrame. use static instead.
Basic-Master is offline
Send a message via ICQ to Basic-Master Send a message via MSN to Basic-Master
Dark Kingdom
BANNED
Join Date: Apr 2007
Location: VT
Old 04-16-2007 , 00:19   Re: [TUT] Touch Stuff
Reply With Quote #26

Nice. Nice. .
Dark Kingdom is offline
nick123
BANNED
Join Date: Dec 2006
Old 04-17-2007 , 00:27   Re: [TUT] Touch Stuff
Reply With Quote #27

BM: you mean a static variable?
nick123 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 19:28.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode