AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugin/Gameplay Ideas and Requests (https://forums.alliedmods.net/forumdisplay.php?f=60)
-   -   [TF2] Casting Spells (https://forums.alliedmods.net/showthread.php?t=228949)

Mitchell 10-30-2013 00:37

[TF2] Casting Spells
 
Okay so i have figured out how to make-shift cast spells:

Find the spell book and set the spell index and charges:
Code:


                while ((ent = FindEntityByClassname(ent, "tf_weapon_spellbook")) != -1)
                {
                        if(ent)
                        {
                                if (GetEntPropEnt(ent, Prop_Send, "m_hOwnerEntity")==client)
                                {
                                        SetEntProp(ent, Prop_Send, "m_iSelectedSpellIndex", spell);
                                        SetEntProp(ent, Prop_Send, "m_iSpellCharges", 10);
                                }
                        }
                }

Possible spells:
0 Fireball
1 Missile thingy (bats)
2 Ubercharge
3 Bomb
4 Super Jump
5 Invisible
6 Teleport
7 Electric Bolt
8 Small body, big head, speed
9 TEAM MONOCULUS
10 Meteor Shower
11 Skeleton Army (Spawns 3)
I used tf2 items to give my self a spell book, it is needed to cast spells.
Code:

SpawnWeapon(client, "tf_weapon_spellbook", 1069, 0, 0, "");
Spoiler


I will probably make a plugin to change/cast spells on players.
Still trying to figure out how to show the "current spell" on hud. lol.

w1200441 10-30-2013 05:54

Re: [TF2] Casting Spells
 
how did you find the m_iSelectedSpellIndex and m_iSpellCharges?

Oshizu 10-30-2013 08:16

Re: [TF2] Casting Spells
 
DataMaps or Netprops probatly

Skyrider 10-30-2013 08:28

Re: [TF2] Casting Spells
 
Question will be if the spells continue to stay alive after Halloween is over.

friagram 10-30-2013 09:05

Re: [TF2] Casting Spells
 
Seems valve twerked the action slot taunt, so, this stuff is a bit messed up.
It's probably just easier to spawn the entity by name that the spellbook uses, its probably a tf_projectile or something... And then shoot it somewhere. That would be more useful that requiring all these other entities, a spellbook. Hud element... And requiring user input.

Mitchell 10-30-2013 12:04

Re: [TF2] Casting Spells
 
Quote:

Originally Posted by friagram (Post 2054593)
Seems valve twerked the action slot taunt, so, this stuff is a bit messed up.
It's probably just easier to spawn the entity by name that the spellbook uses, its probably a tf_projectile or something... And then shoot it somewhere. That would be more useful that requiring all these other entities, a spellbook. Hud element... And requiring user input.

Im actually looking into that right now!
I have a plugin up now.
https://forums.alliedmods.net/showthread.php?t=228982

Requiesta 12-17-2013 17:50

Re: [TF2] Casting Spells
 
I know this is a bit of a necro but I've tried using that stock and although I can give players a spellbook it won't let them cast spells with it. I posted about it in the thread below, can someone (preferably the op who got it to work) tell me what I did wrong?

http://forums.alliedmods.net/showthread.php?t=231592


All times are GMT -4. The time now is 06:04.

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