AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   func_door_rotating (https://forums.alliedmods.net/showthread.php?t=21922)

Cheap_Suit 12-13-2005 21:18

func_door_rotating
 
1. I want to lock a door, so player's wont be able to open it. Would this work?

Code:
register_forward(FM_Think, "fw_entitythink", 0) public fw_entitythink(ent) {     if(g_DoorLocked[ent]) return FMRES_SUPERCEDE     return FMRES_IGNORED }
The code is shorten. I just want to know if FMRES_SUPERCEDE would stop it from rotating.

2. I want to make a door not solid, so player's can go through it. Would this work?
Code:
entity_get_edict(ent, SOLID_NOT)
Im asking because in Ryan's Breakable door plugin, he move the door to another origin so player's can go through.

Twilight Suzuka 12-13-2005 21:41

A lot of inground entities don't think in ways we can catch.

Ingram 12-13-2005 22:04

i've never tried this, so there are just some ideas

1. change the door to a func_wall, then change it back or set the "speed" to 0
2. i know that setting a player to SOLID_NOT allows other players to walk through them, it would probably have the same effect on a regular ent. If not set the absmax and absmin to 0 (or the mins or maxs), i think one of them determines the actual part the player hits.

XxAvalanchexX 12-14-2005 01:12

1. Use register_touch and catch player and func_door(_rotating). If the door shouldn't be opened, return PLUGIN_HANDLED, if not return PLUGIN_CONTINUE. The only exception is on button doors.

2. The proper way would be this:

Code:
entity_set_int(ent, EV_INT_solid, SOLID_NOT);

But it still may not work as you expect.

Cheap_Suit 12-14-2005 03:57

Thank for the info. I will try them :wink:


All times are GMT -4. The time now is 15:58.

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