This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

Force func_door to move


Post New Thread Reply   
 
Thread Tools Display Modes
Sn!ff3r
Veteran Member
Join Date: Aug 2007
Location: Poland
Old 08-20-2009 , 18:46   Re: Force func_door_rotating to move
Reply With Quote #11

I tried force_use, and any results,so I posted.

So ?
__________________
Join US - custom Zombie Server - Custom Addons:



Sn!ff3r is offline
Send a message via Skype™ to Sn!ff3r
Bad_Bud
Senior Member
Join Date: Oct 2006
Location: The internet
Old 08-20-2009 , 18:56   Re: Force func_door_rotating to move
Reply With Quote #12

Quote:
Originally Posted by Exolent[jNr] View Post
All entities have a "targetname" field which is the targetted entity's unique name that is used in the targeting entity's "target" field.
Yeah, but what I was trying to explain to him is that an infinite number of entities (until you hit the ent limit) can target a door (or other entity). An entity targetting a door doesn't somehow change the properties of the door itself, because it's a one-way relationship.

Sn!ffer,

If force_use isn't working, you've done something wrong. Mind posting some code snippet and maybe which map you're using?
__________________
Bad_Bud is offline
Sn!ff3r
Veteran Member
Join Date: Aug 2007
Location: Poland
Old 08-20-2009 , 19:35   Re: Force func_door_rotating to move
Reply With Quote #13

[/php] Player with id 1 is on server, ent id is printing. Map ? any.
__________________
Join US - custom Zombie Server - Custom Addons:




Last edited by Sn!ff3r; 08-21-2009 at 16:14.
Sn!ff3r is offline
Send a message via Skype™ to Sn!ff3r
P34nut
AMX Mod X Beta Tester
Join Date: Feb 2006
Location: Netherlands
Old 08-20-2009 , 20:27   Re: Force func_door to move
Reply With Quote #14

This doesnt work with all doors.. for example the double doors in de_nuke, they use a trigger_multiple you have to touch that to open both doors

Look in my hook plugin to find out how to open the doors
__________________
All you need to change the world is one good lie and a river of blood

Last edited by P34nut; 08-20-2009 at 20:36.
P34nut is offline
Bad_Bud
Senior Member
Join Date: Oct 2006
Location: The internet
Old 08-20-2009 , 22:28   Re: Force func_door_rotating to move
Reply With Quote #15

Quote:
Originally Posted by Sn!ff3r View Post
PHP Code:
        force_use(entPLAYER
lol, it's not working because you're trying to make the door open the player. It should be the other way around.

PHP Code:
force_use(PLAYERent
As far as double doors are concerned, saying it doesn't work on every "door" is misleading. It works on every "func_door" and "func_door_rotating". Just because the "door" happens to be multiple "func_doors" is somewhat irrelevant imo, it just takes a little more work to open both.

Oh, and one last note for Sn!ffer, if you want to convert this to fakemeta later, I think the engfunc or dllfunc (whatever it is) version of force_use is backwards from the engine force_use (ent, PLAYER), like you have yours now.
__________________
Bad_Bud is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 08-21-2009 , 00:55   Re: Force func_door to move
Reply With Quote #16

Try this :

ExecuteHam(Ham_SetToggleState, iDoorId, state)

values for state :
// Things that toggle (buttons/triggers/doors) need this
typedef enum
{
TS_AT_TOP,
TS_AT_BOTTOM,
TS_GOING_UP,
TS_GOING_DOWN
} TOGGLE_STATE;


You also may have to retrieve offset m_toggle_state and alter it.
m_toggle_state will tell you if you have to close the door or not.

This should be the more efficient method.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 08-21-2009 , 04:16   Re: Force func_door to move
Reply With Quote #17

#define PLAYER 0
__________________
xPaw is offline
Sn!ff3r
Veteran Member
Join Date: Aug 2007
Location: Poland
Old 08-21-2009 , 11:46   Re: Force func_door to move
Reply With Quote #18

Quote:
lol, it's not working because you're trying to make the door open the player. It should be the other way around.
Oh lol, this solved my problem. Thanks, bad mistake!
Quote:
#define PLAYER 0

As bottom, force_use requrie connected player (error logs was creating when id is 0).
__________________
Join US - custom Zombie Server - Custom Addons:




Last edited by Sn!ff3r; 08-21-2009 at 11:50.
Sn!ff3r is offline
Send a message via Skype™ to Sn!ff3r
Old 08-21-2009, 11:49
Sn!ff3r
This message has been deleted by Sn!ff3r.
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 08-21-2009 , 11:50   Re: Force func_door to move
Reply With Quote #19

Strange... last time i was using force_use( iEnt, 0 ); and it worked fine, no errors
__________________
xPaw is offline
Sn!ff3r
Veteran Member
Join Date: Aug 2007
Location: Poland
Old 08-21-2009 , 11:54   Re: Force func_door to move
Reply With Quote #20

Code:
L 08/21/2009 - 17:46:53: [ENGINE] Invalid player 0 (not in-game)
L 08/21/2009 - 17:46:53: [AMXX] Run time error 10 (plugin "jail_openjails.amxx") (native "force_use") - debug not enabled!
L 08/21/2009 - 17:46:53: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quote
__________________
Join US - custom Zombie Server - Custom Addons:



Sn!ff3r is offline
Send a message via Skype™ to Sn!ff3r
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 00:49.


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