Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[EO 3.0] Title System


WiseRock
 Share

Recommended Posts

I dunno about tutorials, but i'd probably go something like this:

1- Create an array of strings to hold all the titles (client-side)

2- Add '.hasTitle(1 to MAX_TITLES)' to the playerRec (client and server-side)

3- Add ITEM_TYPE_TITLE (client and server, don't forget the item editor), and in the server's 'Sub UseItem()' add the check for that item type and call 'UnlockTitle( playerIndex, titlenum)', titlenum being a value retrieved from the item's data

>! ```
>! Sub UnlockTitle( byval index as long, byval titlenum as long )
if titlenum < 1 or titlenum > MAX_TITLES then exit sub
if index < 1 or index > MAX_PLAYERS then exit sub
>! Player(index).hasTitle(titlenum) = True
End Sub
>! ```

[EDIT]

4- Add '.selectedTitle' to playerRec

5- on 'Sub DrawPlayerName()' make it draw the player's .selectedTitle
Link to comment
Share on other sites

> ,…,<>" data-cid="926354" data-time="1406569107">
>
> I dunno about tutorials, but i'd probably go something like this:
>
> 1- Create an array of strings to hold all the titles (client-side)
>
> 2- Add '.hasTitle(1 to MAX_TITLES)' to the playerRec (client and server-side)
>
> 3- Add ITEM_TYPE_TITLE (client and server, don't forget the item editor), and in the server's 'Sub UseItem()' add the check for that item type and call 'UnlockTitle( playerIndex, titlenum)', titlenum being a value retrieved from the item's data
>
>
> >! ```
> >! Sub UnlockTitle( byval index as long, byval titlenum as long )
> if titlenum < 1 or titlenum > MAX_TITLES then exit sub
> if index < 1 or index > MAX_PLAYERS then exit sub
> >! Player(index).hasTitle(titlenum) = True
> End Sub
> >! ```
>
> [EDIT]
>
> 4- Add '.selectedTitle' to playerRec
>
> 5- on 'Sub DrawPlayerName()' make it draw the player's .selectedTitle

Thanks I'll try it

Anyone know how to do a simple talent tree
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...