philippe.dion
04-14-2011, 05:04 PM
Hello everyone,
I'm kinda new with UDK so I decided to auto-learn it and I gave myself a little gameplay objective.
I want to make a simple fighter game "a-la" Street Fighter : Two players are fighting each other on a local computer. Movement is made as a sidescroller and there is only One viewport.
Now, I know that there is a first player that is automatically spawned when a map starts (the Login function on GameInfo). On my map, I put two PlayerStart points, where I want my Fighters to spawn at. The problem is, I can't find a way to spawn them on those spawn point by script. How can I specify that ?
I know that we can browse PlayerStart points by the WorldInfo :
ForEach WorldInfo.AllNavigationPoints( class'PlayerStart', N )
But when the first "Login" event occurs, it said that AllNavigationPoints collection is not yet initialized.
How can I then specify a PlayerStart point ?
It seems the engine then find a default spawn point where it spawn the Player's pawn. When this happens, I get this error log message :
DevSpawn: SpawnActor destroyed [Fighter_1] after spawning because it was encroaching on another Actor
like there was two Pawn that are spawning at the same point (but only one LocalPlayer that is loggin in at that point).
Now then on my GameInfo initial state, I spawn a second LocalPlayer. Again, I still get the same error message two times :
DevSpawn: SpawnActor destroyed [Fighter_2] after spawning because it was encroaching on another Actor
DevSpawn: SpawnActor destroyed [Fighter_3] after spawning because it was encroaching on another Actor
So, my three questions are :
- How can we specify a spawn location by script when an initial player logs in ?
- How come it seems two Pawn are spawned when a Player logs in ?
- Is there another alternative to manage players spawning at the beginning of a map ?
Any other advices or suggestions are welcomed !
Thanks :)
Phil
I'm kinda new with UDK so I decided to auto-learn it and I gave myself a little gameplay objective.
I want to make a simple fighter game "a-la" Street Fighter : Two players are fighting each other on a local computer. Movement is made as a sidescroller and there is only One viewport.
Now, I know that there is a first player that is automatically spawned when a map starts (the Login function on GameInfo). On my map, I put two PlayerStart points, where I want my Fighters to spawn at. The problem is, I can't find a way to spawn them on those spawn point by script. How can I specify that ?
I know that we can browse PlayerStart points by the WorldInfo :
ForEach WorldInfo.AllNavigationPoints( class'PlayerStart', N )
But when the first "Login" event occurs, it said that AllNavigationPoints collection is not yet initialized.
How can I then specify a PlayerStart point ?
It seems the engine then find a default spawn point where it spawn the Player's pawn. When this happens, I get this error log message :
DevSpawn: SpawnActor destroyed [Fighter_1] after spawning because it was encroaching on another Actor
like there was two Pawn that are spawning at the same point (but only one LocalPlayer that is loggin in at that point).
Now then on my GameInfo initial state, I spawn a second LocalPlayer. Again, I still get the same error message two times :
DevSpawn: SpawnActor destroyed [Fighter_2] after spawning because it was encroaching on another Actor
DevSpawn: SpawnActor destroyed [Fighter_3] after spawning because it was encroaching on another Actor
So, my three questions are :
- How can we specify a spawn location by script when an initial player logs in ?
- How come it seems two Pawn are spawned when a Player logs in ?
- Is there another alternative to manage players spawning at the beginning of a map ?
Any other advices or suggestions are welcomed !
Thanks :)
Phil