![]() |
|
07-31-2012
|
31 |
|
Nerd
Join Date: Sep 2011
Location: Berlin
Posts: 3,825
|
|
|
07-31-2012
|
32 |
|
299,792,458 m/s
Join Date: Mar 2012
Location: Lebanon
Posts: 3,581
|
Aright guys, now another project I'm in to is the weapon creation. I already made an hp system and a leveling system based on the player's clientr.hp and clientr.maxhp. But is there any way to change the damage of the sword and turn it from hearts to clientr.hp? Also any way to make a custom sword? I tried making one but it failed. |
|
07-31-2012
|
33 | |
|
Registered User
Join Date: Sep 2011
Location: Germany
Posts: 6,122
|
Custom sword: You can disable the weapons with disableWeapons(); (I think it was that one). Than you can have a check if the player is pressing the S key and than use the sword: PHP Code:
PHP Code:
|
|
|
07-31-2012
|
34 | |
|
299,792,458 m/s
Join Date: Mar 2012
Location: Lebanon
Posts: 3,581
|
[PHP] //stuff if (keydown(5)) { setani("sword",NULL); for (plys: allplayers) { If (player.dir == 1 && plys.y <= (player.y +=3)) { //I don't know if that's the correct way to do it, I just bunched someone up //damage stuff here } } } |
|
|
07-31-2012
|
35 | |
|
Nerd
Join Date: Sep 2011
Location: Berlin
Posts: 3,825
|
PHP Code:
|
|
|
07-31-2012
|
36 |
|
299,792,458 m/s
Join Date: Mar 2012
Location: Lebanon
Posts: 3,581
|
|
|
07-31-2012
|
37 |
|
Registered User
Join Date: Sep 2011
Location: Germany
Posts: 6,122
|
I remember having something like a box on the other players and checking if the point in front of your player was inside the box and than I attacked the other player. You could take a look at Skyld's hp system: http://forums.graalonline.com/forums...light=movement |
|
07-31-2012
|
38 | ||
|
Nerd
Join Date: Sep 2011
Location: Berlin
Posts: 3,825
|
Serverside* and no it isn't. It can be used both clientside and serverside.
|
||
|
07-31-2012
|
39 |
|
Registered User
Join Date: Sep 2011
Location: Germany
Posts: 6,122
|
What do you mean? You can check it on clientside and serverside. I wouldn't recommend using the triggeraction() for health though when you have different types of damage (like on iEra). If you want to have it like on iClassic you can use the triggeraction |
|
07-31-2012
|
40 |
|
299,792,458 m/s
Join Date: Mar 2012
Location: Lebanon
Posts: 3,581
|
I'm on iPad, can't style here, it gets annoying using spaces hehe.
|
|
07-31-2012
|
41 |
|
Nerd
Join Date: Sep 2011
Location: Berlin
Posts: 3,825
|
Code on PC then, and you're still able to access fowlplay4's beautifier via the iPad, so there's no excuse >:0 Like... PHP Code:
PHP Code:
|
|
07-31-2012
|
42 | |
|
Registered User
Join Date: Sep 2011
Location: Germany
Posts: 6,122
|
it doesn't really matter. I use format mostly if I have 3+ variables so I don't have to switch from the "" to the SPC/@ and so on
|
|
|
07-31-2012
|
43 |
|
Nerd
Join Date: Sep 2011
Location: Berlin
Posts: 3,825
|
|
|
08-02-2012
|
44 |
|
The General
Join Date: Apr 2012
Location: England
Posts: 1,753
|
|
|
08-02-2012
|
45 |
|
Registered User
Join Date: Sep 2011
Location: Germany
Posts: 6,122
|
You both shut up and clear it in your PMs
|