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

Solved [L4D1/2] How to force Witch to fly (Velocity) ?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
HarryPotter
Veteran Member
Join Date: Sep 2017
Location: Taiwan, Asia
Old 02-12-2022 , 03:50   [L4D1/2] How to force Witch to fly (Velocity) ?
Reply With Quote #1

Simple, basically I want to force witch to fly away, like car flying.
How to do that.

I have tried

PHP Code:
public void OnPluginStart()
{
    
RegConsoleCmd("sm_test"TEST);
}

public 
Action TEST(int clientint args)
{
    if(
client == 0) return Plugin_Handled;

    
float ff[3];
    
ff[0] = 1000.0
    
ff[1] = 1000.0
    
ff[2] = 1000.0
    
int entity = -1;
    while ( ((
entity FindEntityByClassname(entity"witch")) != -1) )
    {
        if(!
IsValidEntity(entity)) continue;

        
PrintToChatAll("witch fly:%d"entity);
        
SetEntityMoveTypeentityMOVETYPE_FLY );
        
TeleportEntity(entity,NULL_VECTOR,NULL_VECTOR,ff); //not working
        
SetEntPropVector(entityProp_Data"m_vecVelocity"ff);  //not working
        
SetEntPropVector(entityProp_Data"m_vecBaseVelocity"ff); //not working
        
SetEntPropVector(entityProp_Data"m_vecAbsVelocity"ff); //not working
        
SetEntPropVector(entityProp_Data"m_vecAngVelocity"ff); //not working
    
}

    
TeleportEntity(client,NULL_VECTOR,NULL_VECTOR,ff);

    return 
Plugin_Handled;

Edited:
Solved by BHaType,
Only works when witch is walking, runing and falling
L4D2

L4D1
Spoiler
__________________

Last edited by HarryPotter; 02-24-2022 at 11:30.
HarryPotter is offline
BHaType
Great Tester of Whatever
Join Date: Jun 2018
Old 02-12-2022 , 18:49   Re: [L4D1/2] How to force Witch to fly (Velocity) ?
Reply With Quote #2

Infected and witches velocity is controlled by their inherited locomotion interfaces so you should use them too

Spoiler
__________________
cry

Last edited by BHaType; 02-12-2022 at 21:06.
BHaType is offline
Send a message via AIM to BHaType
HarryPotter
Veteran Member
Join Date: Sep 2017
Location: Taiwan, Asia
Old 02-13-2022 , 04:38   Re: [L4D1/2] How to force Witch to fly (Velocity) ?
Reply With Quote #3

Quote:
Originally Posted by BHaType View Post
Infected and witches velocity is controlled by their inherited locomotion interfaces so you should use them too

Hmm... I copy and past your code.
It's not working..
the chat prints yes, but not see witch flying

L4D2 Windows server
__________________
HarryPotter is offline
BHaType
Great Tester of Whatever
Join Date: Jun 2018
Old 02-13-2022 , 04:50   Re: [L4D1/2] How to force Witch to fly (Velocity) ?
Reply With Quote #4

Quote:
Originally Posted by HarryPotter View Post
Hmm... I copy and past your code.
It's not working..
the chat prints yes, but not see witch flying

L4D2 Windows server
... ¯\_(ツ)_/¯
__________________
cry
BHaType is offline
Send a message via AIM to BHaType
HarryPotter
Veteran Member
Join Date: Sep 2017
Location: Taiwan, Asia
Old 02-13-2022 , 05:24   Re: [L4D1/2] How to force Witch to fly (Velocity) ?
Reply With Quote #5

Quote:
Originally Posted by BHaType View Post

....No clue

sm plugins list
PHP Code:
[SMListing 17 plugins:
  
01 "Admin File Reader" (1.10.0.6502by AlliedModders LLC
  02 
"Admin Help" (1.10.0.6502by AlliedModders LLC
  03 
"Admin Menu" (1.10.0.6502by AlliedModders LLC
  04 
"Anti-Flood" (1.10.0.6502by AlliedModders LLC
  05 
"Basic Ban Commands" (1.10.0.6502by AlliedModders LLC
  06 
"Basic Chat" (1.10.0.6502by AlliedModders LLC
  07 
"Basic Comm Control" (1.10.0.6502by AlliedModders LLC
  08 
"Basic Commands" (1.10.0.6502by AlliedModders LLC
  09 
"Basic Info Triggers" (1.10.0.6502by AlliedModders LLC
  10 
"Basic Votes" (1.10.0.6502by AlliedModders LLC
  11 
"Client Preferences" (1.10.0.6502by AlliedModders LLC
  12 
"Fun Commands" (1.10.0.6502by AlliedModders LLC
  13 
"Fun Votes" (1.10.0.6502by AlliedModders LLC
  14 
"Player Commands" (1.10.0.6502by AlliedModders LLC
  15 
"Reserved Slots" (1.10.0.6502by AlliedModders LLC
  16 
"Sound Commands" (1.10.0.6502by AlliedModders LLC
  17 
"test.smx" 
Attached Files
File Type: sp Get Plugin or Get Source (test.sp - 169 views - 2.7 KB)
__________________

Last edited by HarryPotter; 02-13-2022 at 05:34.
HarryPotter is offline
BHaType
Great Tester of Whatever
Join Date: Jun 2018
Old 02-13-2022 , 05:47   Re: [L4D1/2] How to force Witch to fly (Velocity) ?
Reply With Quote #6

Added velocity call. You can also try to use !witchesfly when a witch is not on ground
If still doesn't work then i can't help

Spoiler
__________________
cry
BHaType is offline
Send a message via AIM to BHaType
HarryPotter
Veteran Member
Join Date: Sep 2017
Location: Taiwan, Asia
Old 02-13-2022 , 06:26   Re: [L4D1/2] How to force Witch to fly (Velocity) ?
Reply With Quote #7

Quote:
Originally Posted by BHaType View Post
Added velocity call. You can also try to use !witchesfly when a witch is not on ground
If still doesn't work then i can't help

Spoiler
Thank you for replying , this works only when witch is falling.
If I teleport witch on air, can't force witch to fly.
The witch must be falling on air

Still thanks for your work
__________________

Last edited by HarryPotter; 02-13-2022 at 06:27.
HarryPotter is offline
BHaType
Great Tester of Whatever
Join Date: Jun 2018
Old 02-13-2022 , 17:45   Re: [L4D1/2] How to force Witch to fly (Velocity) ?
Reply With Quote #8

Quote:
Originally Posted by HarryPotter View Post
Thank you for replying , this works only when witch is falling.
Atleast its working but only when she falls so that means game blocking Z velocity if shes not on ground.

Try this. If it works i will add comments for offsets
Spoiler
__________________
cry

Last edited by BHaType; 02-15-2022 at 17:31.
BHaType is offline
Send a message via AIM to BHaType
HarryPotter
Veteran Member
Join Date: Sep 2017
Location: Taiwan, Asia
Old 02-14-2022 , 06:36   Re: [L4D1/2] How to force Witch to fly (Velocity) ?
Reply With Quote #9

Quote:
Originally Posted by BHaType View Post
Atleast its working but only when she falls so that means game blocking Z velocity if shes not on ground.

Try this. If it works i will add comments for offsets
Spoiler
This works perfect on standing witch !!
Even witch is on the ground, you can set her fly!!

But there is a small defect, unable to set "Siting Witch" fly.
If survivors don't wake her, it will not work.
Still almost perfect, thank you.
__________________

Last edited by HarryPotter; 02-14-2022 at 06:38.
HarryPotter is offline
azureblue
Member
Join Date: Oct 2021
Location: Two Steps from Hell
Old 02-23-2022 , 14:08   Re: [L4D1/2] How to force Witch to fly (Velocity) ?
Reply With Quote #10

So, I was compiled the source into .smx file but it didn't work. Am I missed something?
My game is L4D2 and on linux server.

Well, I hope you can make and publish this idea about witch fly/jumping mod into official plugin release someday. It's kinda funny watching your video review. Thanks !
azureblue 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 11:13.


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