Hello coders,
I was wondering if some of you including john my coding teacher would help me master the scripting of weapons and melees. Hope you guys could help.
Hello coders,
I was wondering if some of you including john my coding teacher would help me master the scripting of weapons and melees. Hope you guys could help.
Striker*-Have any question, concerns or problems?Message me on forums, click on the link if you need help: http://era-go.com/forum/member.php?410-StrikerNeed help on iEra P.M my nick name is Striker*-Need further help? My email is:[email protected]ENjOY PLAYING IERA!!!!!-Gani Artist
Just make a weapon that makes you change ganis, and add some damage script to it. As basic as that.
-Johnaudi
Yes I know but how do I script it?
Striker*-Have any question, concerns or problems?Message me on forums, click on the link if you need help: http://era-go.com/forum/member.php?410-StrikerNeed help on iEra P.M my nick name is Striker*-Need further help? My email is:[email protected]ENjOY PLAYING IERA!!!!!-Gani Artist
You have many way to do it, for example without an Inventory Script, you could just do something like:
-Player who has weapon say /equip weapon
-Then you replace replace basics gani with replaceani("idle","yourweapon-idle")
-And if you say /remove gun you could replace again the gani
Giving you a small script for it:
PHP Code:
#//CLIENTSIDE
function onPlayerChats(){
if(player.chat == "/equip yourweaponname"){
replaceani("idle", "yourweaponname-idle");
replaceani("walk", "yourweaponname-walk");
replaceani("sword", "yourweaponname-sword");
}
if(player.chat == "/remove yourweaponname"){
replaceani("idle", "idle");
replaceani("walk", "walk");
replaceani("sword", "sword");
}
}
thank you for help
Is that how normal weapons on era are scripted?
Striker*-Have any question, concerns or problems?Message me on forums, click on the link if you need help: http://era-go.com/forum/member.php?410-StrikerNeed help on iEra P.M my nick name is Striker*-Need further help? My email is:[email protected]ENjOY PLAYING IERA!!!!!-Gani Artist
Yes, but it's way more complicated since it has a damage system.
I saw. I conquered. I came.
Yea, when I put the script, I told you that it was a simple script to show you a starting way, you can improve it with damage system, you can add a freeze time,... and if you make a gun it'll include much more parameters.