How can I spawn player at specific location ?

You can talk about ManiaScript for ManiaPlanet here

Moderator: English Moderator

Post Reply
Usul
Posts: 17
Joined: 23 Jul 2013, 15:22
Location: Belgique
Contact:

How can I spawn player at specific location ?

Post 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 :) )
User avatar
TitiShu
Posts: 372
Joined: 27 Feb 2012, 23:31
Location: Belgique

Re: How can I spawn player at specific location ?

Post by TitiShu »

If i'm right, the possibility to create SpawnBlock, PoleBlock and Checkpoint is coming.... but when ???
OS:Windows 8.1 x64
CPU: i5 2500k
RAM: 2x4Go G.Skill Ares
GPU: MSI GTX570
Board: Asus P8Z68-V LX
HDD: WD Green + WD Black
SSD: Crucial M4 64Go
Sound: Realtek (onboard)
Peripherals: Mouse G700 - Keyboard G19 - Headset Roccat Kave
User avatar
steeffeen
Translator
Translator
Posts: 2463
Joined: 14 Oct 2012, 16:22
Location: Germany

Re: How can I spawn player at specific location ?

Post 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 :D

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 ^.^
    Game Mode and Title Pack Creator, Developer, ShootMania-Player & more

    ManiaControl, FancyManiaLinks
    Usul
    Posts: 17
    Joined: 23 Jul 2013, 15:22
    Location: Belgique
    Contact:

    Re: How can I spawn player at specific location ?

    Post 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
    User avatar
    djhubertus
    Translator
    Translator
    Posts: 1097
    Joined: 09 Jul 2012, 18:30
    Location: Poland
    Contact:

    Re: How can I spawn player at specific location ?

    Post by djhubertus »

    You can use manialink with audio tag.
    My Gamemodes:
    MP4 - Countdown, Firefight
    MP3 - Reduction, Overload, Flashpoint, Territory, SM Race, Escape
    MP2 - Search & Destroy, Oscillation, Instagib
    Usul
    Posts: 17
    Joined: 23 Jul 2013, 15:22
    Location: Belgique
    Contact:

    Re: How can I spawn player at specific location ?

    Post 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
    Post Reply

    Return to “ManiaScript”

    Who is online

    Users browsing this forum: No registered users and 1 guest