Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Respawn class ?
#1
How to change respawn for class ? (I have see 1 respawn for ALL Oo)
I have see that :
http://web.miragesource.com/old-tutorial...asses.html
But don't work. Sad

Can I help me please ?

Thanks you in advance.
Reply
#2
Change the map number to the one you want....same with the x/y coords.

The tutorial you linked shows exactly how to do it. Just don't leave 1 for all the maps.
Reply
#3
El_Dindonnier Wrote:How to change respawn for class ? (I have see 1 respawn for ALL Oo)
I have see that :
http://web.miragesource.com/old-tutorial...asses.html
But don't work. Sad

Can I help me please ?

Thanks you in advance.

Not a good tutorial as far as I can tell :?
Reply
#4
Yeah there are many ways you could do it.

You could save it to the class file. You could have it in the code. You could let the player pick from a few different starting positions. Etc etc...
Reply
#5
When i change that :
Code:
Public Const START_MAP = 1
Public Const START_X = MAX_MAPX / 2
Public Const START_Y = MAX_MAPY / 2
With :
[code]public START_MAP as byte
Public START_X as byte
Public START_Y as byte

select case getplayerclass(index)

case 0
START_MAP = 1 '
Reply
#6
Make a sub and when you load your classes or something call it.

If you don't know how to do this, I'll write you something simple.
Reply
#7
shaded Wrote:Make a sub and when you load your classes or something call it.

If you don't know how to do this, I'll write you something simple.
Sorry Sad I don't understand. Sad

You can write the sub for me ? please ?

Thanks you in advance.
Reply
#8
I will in a bit, my friend stopped over. Going out for some beer.
Reply
#9
Ok.,...I am hammmered!

Sub ClassStartPosition(Byval ClassNum)
Enter select case thing
end sub


Change start position consamts and turn them into pbuliv as tutorial says.

Call classstartpostion(GetClassNumber)
Call this in load classes with you intitialtize the clasees when server starts!

:twisted: :twisted: :twisted: :twisted: :twisted:
Wow smahamered!

pm me I will egt you something mor legible
Reply
#10
Well I just did something really easy...

Code:
Public Function START_MAP(ByVal Index As Long) As Long

    START_MAP = Class(Player(Index).Char(Player(Index).CharNum).Class).Map

End Function

Public Function START_X(ByVal Index As Long) As Long

    START_X = Class(Player(Index).Char(Player(Index).CharNum).Class).x
    
End Function

Public Function START_Y(ByVal Index As Long) As Long

    START_Y = Class(Player(Index).Char(Player(Index).CharNum).Class).y

End Function

Simply add this under Type ClassRec:

Code:
Map As Long
    x As Integer
    y As Integer

And then you just need to go to where the classes are loaded and copy what everything else does and change it to Map and X and Y and so on...pretty simple.

Also you need to change all START_MAP / X / Y's to have (index) after them.
Reply
#11
It's work ! :mrgreen:

Thanks you shaded and GIAKEN for your help ! Big Grin
Reply
#12
lol Sorry I wasn't more helpful. Last night it was suppose to be one of those "1 beer" moments at the bar.....
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)