Raised This Month: $32 Target: $400
 8% 

[Tutorial] Learn the new ways


Post New Thread Reply   
 
Thread Tools Display Modes
timian
Member
Join Date: Oct 2006
Location: Denmark
Old 04-09-2010 , 12:37   Re: [Tutorial] Learn the new ways
Reply With Quote #21

okay! thanks! ^^ but now i actually start thinking about a "pcvar" i know cavar = console variable, is a pcvar a player cvar then?
timian is offline
vittu
SuperHero Moderator
Join Date: Oct 2004
Location: L.A. County, CA
Old 04-09-2010 , 15:37   Re: [Tutorial] Learn the new ways
Reply With Quote #22

Quote:
Originally Posted by timian View Post
okay! thanks! ^^ but now i actually start thinking about a "pcvar" i know cavar = console variable, is a pcvar a player cvar then?
cvar pointer
It's an integer value that represents the cvar for faster lookup.
vittu is offline
Send a message via AIM to vittu Send a message via MSN to vittu Send a message via Yahoo to vittu
timian
Member
Join Date: Oct 2006
Location: Denmark
Old 04-09-2010 , 16:07   Re: [Tutorial] Learn the new ways
Reply With Quote #23

oh! thanks vittu! ^^
timian is offline
liinuus
Senior Member
Join Date: Apr 2010
Old 04-30-2010 , 13:51   Re: [Tutorial] Learn the new ways
Reply With Quote #24

can u make an tut for lasers/beams to?
liinuus is offline
Jelle
[b]MOAR CANDY[/b]
Join Date: Aug 2009
Location: Denmark
Old 04-30-2010 , 14:03   Re: [Tutorial] Learn the new ways
Reply With Quote #25

Take a hero with laser in it and add health or what you want to add using this tutorial. I do not have the time to make it.
__________________
No idea what to write here...
Jelle is offline
Send a message via MSN to Jelle
The Art of War
Veteran Member
Join Date: Dec 2009
Location: Sweden Rock Festival
Old 04-30-2010 , 14:58   Re: [Tutorial] Learn the new ways
Reply With Quote #26

I might try to do something like it, but Jelle is a lot better then me and vittu would probably tell me that I forgot something or made something wrong -.- I might still make something outside AM
Its not that hard any more, to make a keydown hero. Just use sh_set_hero_bind(id) to make it a bind power, then use for example if(if ( key == SH_KEYDOWN ) and then execute the blocks for damage and effects and so on, add a cooldown by using for example if (get_pcvar_float(pCvarCooldown) > 0.0) sh_set_cooldown(attacker, get_pcvar_float(pCvarCooldown))

Use sh_extra_damage to make the damage, an example is sh_extra_damage(victim/id, damage, "Deathray")
then define damage by using something like new damage = get_pcvar_num(pCvarMaxDamage)
__________________

Last edited by The Art of War; 04-30-2010 at 15:00.
The Art of War is offline
RollerBlades
Senior Member
Join Date: Feb 2011
Location: Sweden
Old 03-04-2011 , 09:26   Re: [Tutorial] Learn the new ways
Reply With Quote #27

hi i recently been working on a beginner hero...

and i always get theese 4 erros when i want to attach weapon model...

so can anyone clean up some stuffs in it just quickly and then tell me why it didnt work

plz make it work...
Attached Files
File Type: zip Golden Eye.zip (730.6 KB, 124 views)
RollerBlades is offline
The Art of War
Veteran Member
Join Date: Dec 2009
Location: Sweden Rock Festival
Old 03-04-2011 , 12:16   Re: [Tutorial] Learn the new ways
Reply With Quote #28

DOnt post it here, make a separate thread.
__________________
The Art of War is offline
Jelle
[b]MOAR CANDY[/b]
Join Date: Aug 2009
Location: Denmark
Old 03-04-2011 , 12:51   Re: [Tutorial] Learn the new ways
Reply With Quote #29

If he used this tutorial I think it is in place to ask here.

I will look on it.

EDIT:

Okay, for once, do not use sh_set_hpap() twice.
I have already edited the tutorial so it says it is only to be used ONCE!

Therefor this:

PHP Code:
     sh_set_hero_hpap(gheroIDpcvarHealth0)
     
sh_set_hero_hpap(gheroID0pcvarArmor
Should be this:

PHP Code:
     sh_set_hero_hpap(gheroIDpcvarHealthpcvarArmor
However, that is not why it is not working, this is why:

You make a new global variable called gHeroID. Then you point it to sh_create_hero() correctly.
But when you are setting powers to your hero, you are using gheroID, making a lower case "h". The compiler is case sensitive, which means that you should change this:

PHP Code:
     sh_set_hero_hpap(gheroIDpcvarHealth0)
     
sh_set_hero_hpap(gheroID0pcvarArmor
to

PHP Code:
     sh_set_hero_hpap(gHeroIDpcvarHealth0)
     
sh_set_hero_hpap(gHeroID0pcvarArmor
And now don't remember to make it just one line:

PHP Code:
     sh_set_hero_hpap(gHeroIDpcvarHealthpcvarArmor
Now it compiles for me.

EDIT2:

Crap, just looked over the code again as it looked pretty small, and what do you know, you are missing something.

When do you precache the model you want to use?

Precache = download.

You need to make clients precache the model before they can see it. Look up the plugin_precache() part of my tutorial.
__________________
No idea what to write here...

Last edited by Jelle; 03-04-2011 at 13:05.
Jelle is offline
Send a message via MSN to Jelle
RollerBlades
Senior Member
Join Date: Feb 2011
Location: Sweden
Old 03-05-2011 , 03:47   Re: [Tutorial] Learn the new ways
Reply With Quote #30

ok thanks!

hope it works!

EDIT:

ohh yea about the prechace model i was worried about that too first but when i looked at the tutorial i coudnt find at first ;P ty

Ok, i took
new const gGoldenWeapon[] = "models/shmod/geye_v_p90.mdl" and copied gGoldenWeapon
like this
precache_model(gGoldenWeapon) <<< and now the weapon model will work...
i just wanna ask.... why does it say loose indentation twice? 0_o

Last edited by RollerBlades; 03-05-2011 at 05:20.
RollerBlades 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 17:21.


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