Author Topic: [old topic] Succubus Hunter  (Read 26111 times)

DisturbeD

  • Newbie
  • *
  • Posts: 39
  • Me fail English? That’s unpossible.
    • View Profile
    • Email
[old topic] Succubus Hunter
« on: December 03, 2009, 05:15:28 PM »
Hey Ho,
remade the race Succubus Hunter..


Skills:

1.) [ATTACK-SKILL] Head Hunter:
Do extra damage and gain your victim's SKULLs.

Note: This is your main skill... The higher you lvled this skill the more damage you do and the more skulls you gain,
but more skulls means at the same time a smaller chance to get more skulls.. Additionally the capacity to hold skulls
depends on the lvl of this skill:
Lvl 1 = 5 Skulls
Lvl 2 = 10 Skulls etc..

2.) [SPAWN-SKILL] Totem Incantation:
You gain 1-2HP, 25-50$ and 1-5XP for each skull you collected.

3.) [JUMP-SKILL] Assault Tackle:
Makes you jump longer.

4.) [ULTIMATE] Daemonic Transformation:
Get 20-80% less gravity, 20-80% more speed and 10-40 HP. Costs 1/2/3/4 SKULLs.
« Last Edit: September 04, 2010, 06:57:05 AM by Ownz »

Anthony Iacono

  • Lead Developer
  • Administrator
  • Full Member
  • *****
  • Posts: 136
  • Lets make it better.
    • MSN Messenger - anthonyiacono@gmail.com
    • View Profile
    • My Blog
    • Email
Re: Succubus Hunter
« Reply #1 on: December 03, 2009, 05:49:56 PM »
Remember, each race only gets 3 skills and 1 ultimate.
Not going to read through the whole thing right now but nice! :)

DisturbeD

  • Newbie
  • *
  • Posts: 39
  • Me fail English? That’s unpossible.
    • View Profile
    • Email
Re: Succubus Hunter
« Reply #2 on: December 03, 2009, 06:08:11 PM »
what the?!  ;D why only 3 skills and 1 ultimate?
Just overflew your tutorial, so I might didn read somethin...
Well I can fuse the 2 damage skills, so it shouldn be a problem!

Anthony Iacono

  • Lead Developer
  • Administrator
  • Full Member
  • *****
  • Posts: 136
  • Lets make it better.
    • MSN Messenger - anthonyiacono@gmail.com
    • View Profile
    • My Blog
    • Email
Re: Succubus Hunter
« Reply #3 on: December 03, 2009, 07:23:09 PM »
:) Thats how it was in 1.6, I am old school :P

DisturbeD

  • Newbie
  • *
  • Posts: 39
  • Me fail English? That’s unpossible.
    • View Profile
    • Email
Re: Succubus Hunter
« Reply #4 on: December 03, 2009, 07:39:45 PM »
Lol  :D But theoretically its possible to have more skills? Coz im not that old school  :P
Looking at my profile I know that sourcepawn exists for 7 hours minus 4 hours when I started reading the docu..

Anthony Iacono

  • Lead Developer
  • Administrator
  • Full Member
  • *****
  • Posts: 136
  • Lets make it better.
    • MSN Messenger - anthonyiacono@gmail.com
    • View Profile
    • My Blog
    • Email
Re: Succubus Hunter
« Reply #5 on: December 03, 2009, 09:08:15 PM »
Maybe in the future but for beta at least it'll be 4.

stinkyfax

  • Full Member
  • ***
  • Posts: 120
    • View Profile
    • Email
Re: Succubus Hunter
« Reply #6 on: December 07, 2009, 06:12:28 PM »
some restrictions make uniqueness to the game-style, so probably this restriction is a must.

DisturbeD

  • Newbie
  • *
  • Posts: 39
  • Me fail English? That’s unpossible.
    • View Profile
    • Email
Re: Succubus Hunter
« Reply #7 on: December 08, 2009, 07:19:18 AM »
But that is what I liked very much about WCS.. Every race can be unique with different kinds AND number of skills (if you dont look at 80% of the cped races)

DisturbeD

  • Newbie
  • *
  • Posts: 39
  • Me fail English? That’s unpossible.
    • View Profile
    • Email
Re: Succubus Hunter
« Reply #8 on: December 12, 2009, 02:34:44 PM »
Hey, wrote all my exams so I can go back to learning sourcepawn again..
Just downloaded a compiler and saw that I got tons of errors in this race..
Tho I fixed it and the race should be playable now, I still got a few questions:

1. How to pass more than 1 number parameter in a timer? I used CreateDataTimer
and changed an int to a float to be able to pass everything.. but there should be a better way to do that..

2. How to fake damage done to a player by another player.. I heard of dhTakeDamage from Dukehacks but I read that
this isn working anymore... any other way?
I want it to look like that:



3. What does loose indentation means? It bugs me that I fixed all errors and got 1 warning remaining...

After this race Ill be probably tryin myself in some custom races..
« Last Edit: December 12, 2009, 02:39:43 PM by DisturbeD »

stinkyfax

  • Full Member
  • ***
  • Posts: 120
    • View Profile
    • Email
Re: Succubus Hunter
« Reply #9 on: December 12, 2009, 02:42:03 PM »
you could use same method as WCS uses but it has a limit of weapon type. You could also use method my wow mod uses but it has a limit of side effect spec-after-death (your slow-motion camera after death points out at random target in CSS rather than killer, though in TF2 it works fine)
You could invent your method.

Now about the timer - yes you can. You can send handles as argument which means u can send everything, try studying a little "Datapack" handle, I guess that's what u need.

DisturbeD

  • Newbie
  • *
  • Posts: 39
  • Me fail English? That’s unpossible.
    • View Profile
    • Email
Re: Succubus Hunter
« Reply #10 on: December 12, 2009, 03:01:13 PM »
Hmm
1). WCS method:
Code: [Select]
        es_give server_var(wcs_ddtargetid) point_hurt
        es_fire server_var(wcs_ddtargetid) !self addoutput "targetname badboy"
        es_fire server_var(wcs_ddtargetid) point_hurt addoutput "targetname rps_damage"
        es_format wcs_hurt_damage "Damage %1" server_var(wcs_dddamage)
        es_fire server_var(wcs_ddtargetid) rps_damage addoutput server_var(wcs_hurt_damage)
        es_fire server_var(wcs_ddtargetid) rps_damage addoutput "DamageType 1"
        es_fire server_var(wcs_dduserid) rps_damage addoutput "DamageTarget badboy"
        es_fire server_var(wcs_ddtargetid) rps_damage TurnOn
        es_fire server_var(wcs_dduserid) rps_damage Hurt
        es_fire server_var(wcs_ddtargetid) rps_damage kill
        es_fire server_var(wcs_ddtargetid) !self addoutput "targetname taco"

SourcePawn translation by AtomicStryker:
Code: [Select]
DamageEffect(target)
{
    new pointHurt = CreateEntityByName("point_hurt");            // Create point_hurt
    DispatchKeyValue(target, "targetname", "hurtme");                // mark target
    DispatchKeyValue(pointHurt, "Damage", "0");                    // No Damage, just HUD display. Does stop Reviving though
    DispatchKeyValue(pointHurt, "DamageTarget", "hurtme");        // Target Assignment
    DispatchKeyValue(pointHurt, "DamageType", "65536");            // Type of damage
    DispatchSpawn(pointHurt);                                        // Spawn descriped point_hurt
    AcceptEntityInput(pointHurt, "Hurt");                         // Trigger point_hurt execute
    AcceptEntityInput(pointHurt, "Kill");                         // Remove point_hurt
    DispatchKeyValue(target, "targetname",    "cake");            // Clear target's mark

But this doesn fake the damage by another player.. its just like ForcePlayerSuicide...

2. WOW method:
Your code is over 15000 lines.. where to start searching? xD

3. Creating my own method:
Im a beginner.. u are really overestimating me!

4, Where to study Datapack-handling? This didn help at all:
http://wiki.alliedmods.net/DataPacks

*Hmm correct me if Im wrong, but are the datapacks resembling the queue type in c++`?
So you can write all kind of cells in there and when u read them, the first element is being
deleted and the second element is ready to be read...
« Last Edit: December 12, 2009, 03:35:20 PM by DisturbeD »

stinkyfax

  • Full Member
  • ***
  • Posts: 120
    • View Profile
    • Email
Re: Succubus Hunter
« Reply #11 on: December 12, 2009, 03:19:14 PM »
WCS method indeed kills target, but that's what you need - good killing.
To deal non killing damage you just reduce target's health. The problem is reached when you need to kill target in good way - give the killer trophy make scores look good, etc.
So the dealdamage in WCs looks this way:
dealdamage(client, 50) ->>>
if health > 50 then health -= 50
else
run killing function.

Also don't make same mistake as WCS has, you should also send fake event of damage done so that statistics plugins can keep track on extra damage instead of pass it by.


about wow mod, finding out how my system work will require rly lots of efforts so you better let it go or try later with more expirience.

wiki DataPack site is useless :D
I'll try explain in breath how u use it for timers:
create handle, create datapack, push cells/floats/strings u need (if u push strings make sure u know the size of string during extraction)
then create timer and send handle as argument, also include TIMER_HANDLE_CLOSE (or it's TMR_HANDLE_CLOSE) Flag which will close handle automatically when timer is killed/expired.

In timer's callback receive the handle as argument, example:
public Action:my_Timer(Handle:timer, Handle:pack) {
and now just read those arguments, don't forget to rewind..
ResetPack(pack);
read cell,
read float,
read strings..
Make sure you read exactly in same order and as much as u saved, otherwise u'll get errors.
}

Good luck :)

DisturbeD

  • Newbie
  • *
  • Posts: 39
  • Me fail English? That’s unpossible.
    • View Profile
    • Email
Re: Succubus Hunter
« Reply #12 on: December 12, 2009, 03:34:54 PM »
Ok ty.. your explanation about datapacks confirmed my opinion that datapacks are like queues in c++

Well and about the dealdamage thing: I knew how they have done the killing part.. the question is how to fake that another player killed the victim?
Like in the pic above ^_^

Well hope Anthony implements a dealdamage function.. that would help alot!

Naris

  • Jr. Member
  • **
  • Posts: 58
    • View Profile
    • Email
Re: Succubus Hunter
« Reply #13 on: December 12, 2009, 03:46:38 PM »
Here is a version of your Succubus Hunter race that I fixed to compile and to work in TF2 and DOD.

To do damage it uses this code:

Code: [Select]
                        new new_health=GetClientHealth(index)-RoundFloat(damage);
                        if (new_health<=0)
                            ForcePlayerSuicide(index);
                        else
                            SetEntityHealth(index,new_health);

stinkyfax

  • Full Member
  • ***
  • Posts: 120
    • View Profile
    • Email
Re: Succubus Hunter
« Reply #14 on: December 12, 2009, 03:49:46 PM »
         new Handle:pack;
         CreateDataTimer(10.0,FinishTrans,pack);
         WritePackCell(pack, client);
         WritePackFloat(pack, float(skill_trans*10));
Uh? error code.
do:
new Handle:pack = CreateDatapack();
Write..
Write..
CreateDataTimer..
I wouldn't risk creating timer with unprepared handle eventhough it has 10 seconds but what if there is another function which will call timer immediately?

Naris

  • Jr. Member
  • **
  • Posts: 58
    • View Profile
    • Email
Re: Succubus Hunter
« Reply #15 on: December 12, 2009, 04:03:57 PM »
         new Handle:pack;
         CreateDataTimer(10.0,FinishTrans,pack);
         WritePackCell(pack, client);
         WritePackFloat(pack, float(skill_trans*10));
Uh? error code.
do:
new Handle:pack = CreateDatapack();
Write..
Write..
CreateDataTimer..
I wouldn't risk creating timer with unprepared handle eventhough it has 10 seconds but what if there is another function which will call timer immediately?

Noooooooooooooooo!!!!

That will leak handles all over the place!

He had it correct,
Code: [Select]
new Handle:pack;
CreateDataTimer(10.0,FinishTrans,pack);

The CreateDataTime() stock creates a DataPack, so your method will create an extra datapack that is never used and never closed.

Also, The source engine is single threaded, so there is absolutely NO way "another function " can "call the timer" before the end if the code in question. Also the mythical "other function" would have to have the Timer's Handle to even attempt to trigger it.

stinkyfax

  • Full Member
  • ***
  • Posts: 120
    • View Profile
    • Email
Re: Succubus Hunter
« Reply #16 on: December 12, 2009, 04:09:08 PM »
that's true, I haven't noticed its CreateDataTimer, I usually use CreateTimer for datapacks as well which doesn't modify handle.
Then it is correct considering the function is different.

DisturbeD

  • Newbie
  • *
  • Posts: 39
  • Me fail English? That’s unpossible.
    • View Profile
    • Email
Re: Succubus Hunter
« Reply #17 on: December 12, 2009, 04:24:01 PM »
Hey naris thank you for fixin... Tho I guess u didn fix the latest version..
But there is still alot of new lines in there.. Ill look at it later to decide what to implement ^_^

just 1 lil error at compiling -> you forgot #include <sdktools_functions>
« Last Edit: December 12, 2009, 04:41:45 PM by DisturbeD »

DisturbeD

  • Newbie
  • *
  • Posts: 39
  • Me fail English? That’s unpossible.
    • View Profile
    • Email
Re: Succubus Hunter
« Reply #18 on: December 12, 2009, 05:11:41 PM »
ok just fixed the ultimate for now (credits goes to Naris)
After I made all effects and found a better way to fake damage, Ill probably do 2 versions:
1 for Css and 1 for TF2 and DOD..

Dang your source code would have helped me alot before I fixed most bugs myself  ;D
« Last Edit: December 16, 2009, 05:59:39 PM by DisturbeD »

DisturbeD

  • Newbie
  • *
  • Posts: 39
  • Me fail English? That’s unpossible.
    • View Profile
    • Email
Re: Succubus Hunter
« Reply #19 on: December 16, 2009, 06:03:30 PM »
Found some time to fix the race...
Gotta test it tomorrow but I think everything should be fixed now  :D

Files at the first post -> http://war3source.com/index.php?topic=15.msg61#msg61

Anthony Iacono

  • Lead Developer
  • Administrator
  • Full Member
  • *****
  • Posts: 136
  • Lets make it better.
    • MSN Messenger - anthonyiacono@gmail.com
    • View Profile
    • My Blog
    • Email
Re: Succubus Hunter
« Reply #20 on: December 16, 2009, 07:36:51 PM »
Hmm
1). WCS method:
Code: [Select]
        es_give server_var(wcs_ddtargetid) point_hurt
        es_fire server_var(wcs_ddtargetid) !self addoutput "targetname badboy"
        es_fire server_var(wcs_ddtargetid) point_hurt addoutput "targetname rps_damage"
        es_format wcs_hurt_damage "Damage %1" server_var(wcs_dddamage)
        es_fire server_var(wcs_ddtargetid) rps_damage addoutput server_var(wcs_hurt_damage)
        es_fire server_var(wcs_ddtargetid) rps_damage addoutput "DamageType 1"
        es_fire server_var(wcs_dduserid) rps_damage addoutput "DamageTarget badboy"
        es_fire server_var(wcs_ddtargetid) rps_damage TurnOn
        es_fire server_var(wcs_dduserid) rps_damage Hurt
        es_fire server_var(wcs_ddtargetid) rps_damage kill
        es_fire server_var(wcs_ddtargetid) !self addoutput "targetname taco"

SourcePawn translation by AtomicStryker:
Code: [Select]
DamageEffect(target)
{
    new pointHurt = CreateEntityByName("point_hurt");            // Create point_hurt
    DispatchKeyValue(target, "targetname", "hurtme");                // mark target
    DispatchKeyValue(pointHurt, "Damage", "0");                    // No Damage, just HUD display. Does stop Reviving though
    DispatchKeyValue(pointHurt, "DamageTarget", "hurtme");        // Target Assignment
    DispatchKeyValue(pointHurt, "DamageType", "65536");            // Type of damage
    DispatchSpawn(pointHurt);                                        // Spawn descriped point_hurt
    AcceptEntityInput(pointHurt, "Hurt");                         // Trigger point_hurt execute
    AcceptEntityInput(pointHurt, "Kill");                         // Remove point_hurt
    DispatchKeyValue(target, "targetname",    "cake");            // Clear target's mark

But this doesn fake the damage by another player.. its just like ForcePlayerSuicide...

2. WOW method:
Your code is over 15000 lines.. where to start searching? xD

3. Creating my own method:
Im a beginner.. u are really overestimating me!

4, Where to study Datapack-handling? This didn help at all:
http://wiki.alliedmods.net/DataPacks

*Hmm correct me if Im wrong, but are the datapacks resembling the queue type in c++`?
So you can write all kind of cells in there and when u read them, the first element is being
deleted and the second element is ready to be read...
War3_DealDamage :)

Anthony Iacono

  • Lead Developer
  • Administrator
  • Full Member
  • *****
  • Posts: 136
  • Lets make it better.
    • MSN Messenger - anthonyiacono@gmail.com
    • View Profile
    • My Blog
    • Email
Re: Succubus Hunter
« Reply #21 on: December 16, 2009, 08:08:55 PM »
What I meant to say is War3_DealDamage is already implimented. Use that instead please.

DisturbeD

  • Newbie
  • *
  • Posts: 39
  • Me fail English? That’s unpossible.
    • View Profile
    • Email
Re: Succubus Hunter
« Reply #22 on: December 17, 2009, 01:24:36 PM »
Oh didn know that.. but Im gettin an error if I want to compile the code:  error 017: undefined symbol "War3_DealDamage"
I included the latest version of War3Source.. what am I doin wrong?  ???

Anthony Iacono

  • Lead Developer
  • Administrator
  • Full Member
  • *****
  • Posts: 136
  • Lets make it better.
    • MSN Messenger - anthonyiacono@gmail.com
    • View Profile
    • My Blog
    • Email
Re: Succubus Hunter
« Reply #23 on: December 17, 2009, 02:30:48 PM »
You must not have the latest version.
Paste your War3Source_Interface.inc

DisturbeD

  • Newbie
  • *
  • Posts: 39
  • Me fail English? That’s unpossible.
    • View Profile
    • Email
Re: Succubus Hunter
« Reply #24 on: December 17, 2009, 03:18:29 PM »
Ah solved it myself, my pc didn overwrite the old file ... sry my fault  ;D

well added War3_DealDamage and fixed a lil jump bug.. last thing which Ill do with this race is Naris TF2 support ;p
« Last Edit: December 17, 2009, 03:42:31 PM by DisturbeD »