Page 1 of 1
How can I spawn player at specific location ?
Posted: 23 Jul 2013, 15:51
by Usul
I would like to change or create a new BlockSpawn 3d object
but I can not find the basic values of the ​​Spawn.Item.xml...
I can also change the code to give a new Spawn position
Like here
Code: Select all
declare CSmBlockSpawn bs = BlockSpawns[SpawnId];
declare Position for bs = NewValueVec3 ; //Type Vec3
SM::SpawnPlayer(_Player, 0, bs );
but override the Value Position don't work...(may be because Position is in a value of CSmLandmark Struct )
somebody can Help me ? plz
(sorry I have some problem to write correctly in english

)
Re: How can I spawn player at specific location ?
Posted: 23 Jul 2013, 18:47
by TitiShu
If i'm right, the possibility to create SpawnBlock, PoleBlock and Checkpoint is coming.... but when ???
Re: How can I spawn player at specific location ?
Posted: 23 Jul 2013, 18:52
by steeffeen
well you can't change the position of blocks with maniascript
BlockSpawn.Position = <whatever>;
won't work because .Position is constant of course, otherwise the computed shadows are wrong after moving a block anyways
players can only be spawned in blockspawns while bots can be spawned on any block (jump pad, rail, etc.)
custom blocks with function will be possible in 2015 i guess ^.^
Re: How can I spawn player at specific location ?
Posted: 23 Jul 2013, 19:56
by Usul
ok thx
2015 ... I guess, I have to go back in 1985 to take the Delorean with Marty :p
and I have a other question:
is it possible to play a custom sound with ManiaScript ? not a EUISound but a .wav
Re: How can I spawn player at specific location ?
Posted: 23 Jul 2013, 20:53
by djhubertus
You can use manialink with audio tag.
Re: How can I spawn player at specific location ?
Posted: 24 Jul 2013, 07:46
by Usul
Ok,Like in this example:
Code: Select all
<frame posn="0 0" id="Frame_MyFrame">
<audio data="file://Media/Sounds/MySound.wav" play="0" looping="0" hidden="1" id="Audio_MyAudio" />
</frame>
it works, thank you