Mirage Source
Respawn class ? - Printable Version

+- Mirage Source (https://mirage-engine.uk/forums)
+-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61)
+--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18)
+---- Forum: General (https://mirage-engine.uk/forums/forumdisplay.php?fid=17)
+---- Thread: Respawn class ? (/showthread.php?tid=1824)



Respawn class ? - El_Dindonnier - 11-06-2008

How to change respawn for class ? (I have see 1 respawn for ALL Oo)
I have see that :
http://web.miragesource.com/old-tutorials/temporary_archive/Different%20Respawn%20For%20Classes.html
But don't work. Sad

Can I help me please ?

Thanks you in advance.


Re: Respawn class ? - shaded - 11-06-2008

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.


Re: Respawn class ? - GIAKEN - 11-06-2008

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-tutorials/temporary_archive/Different%20Respawn%20For%20Classes.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 :?


Re: Respawn class ? - shaded - 11-06-2008

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...


Re: Respawn class ? - El_Dindonnier - 11-06-2008

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 '


Re: Respawn class ? - shaded - 11-06-2008

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.


Re: Respawn class ? - El_Dindonnier - 12-06-2008

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.


Re: Respawn class ? - shaded - 12-06-2008

I will in a bit, my friend stopped over. Going out for some beer.


Re: Respawn class ? - shaded - 12-06-2008

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


Re: Respawn class ? - GIAKEN - 12-06-2008

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.


Re: Respawn class ? - El_Dindonnier - 12-06-2008

It's work ! :mrgreen:

Thanks you shaded and GIAKEN for your help ! Big Grin


Re: Respawn class ? - shaded - 12-06-2008

lol Sorry I wasn't more helpful. Last night it was suppose to be one of those "1 beer" moments at the bar.....