Scripts / reading player height

Author
Message
Tarkus1971
Audio Media Maker
9
Years of Service
User Offline
Joined: 24th Feb 2015
Location: England, UK
Posted: 25th Mar 2016 16:17
Is there anyway of reading the players height, for example I need to find out if the player is on a default terrain height level, or detect altitude. Can't seem to find it anywhere?
Aftershock Quad Core AMD FM2+ 3.5 GHz 8GB Motherboard and Processor, A7700k apu, AMD HD7870 gfx card.
King Korg Synth, Alesis SR18 Drum Machine, Akai MPX8 sample player, Roland Fantom XA Synth, Axus Digital AXK2 Digital Drum Kit.
Corno_1
GameGuru Tool Maker
14
Years of Service
User Offline
Joined: 3rd Nov 2010
Location:
Posted: 25th Mar 2016 18:19


is the value of the player hight
My dream is to develope games, which makes fun when I create it and fun when other people play it.
PM
Tarkus1971
Audio Media Maker
9
Years of Service
User Offline
Joined: 24th Feb 2015
Location: England, UK
Posted: 28th Mar 2016 09:52
thanks corno_1, just there was a way to place zones at different heights, instead of stacking them and then reading height of player when you enter them.

multi storey buildings can be tricky when using zones.
Aftershock Quad Core AMD FM2+ 3.5 GHz 8GB Motherboard and Processor, A7700k apu, AMD HD7870 gfx card.
King Korg Synth, Alesis SR18 Drum Machine, Akai MPX8 sample player, Roland Fantom XA Synth, Axus Digital AXK2 Digital Drum Kit.
Corno_1
GameGuru Tool Maker
14
Years of Service
User Offline
Joined: 3rd Nov 2010
Location:
Posted: 28th Mar 2016 17:12
I did not know what you want Zones over other zones? Not sure if this works.
My dream is to develope games, which makes fun when I create it and fun when other people play it.
PM
3com
10
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 28th Mar 2016 19:11
Let's say you've a building with 3 levels, so you want to place 3 triggers.
obviously if the player enters 2º and 3º level, this meant he is a different terrain height.
And the 1º trigger meant he is a terrain height.
So each trigger can read player height, prompt you about it, and even state a gobal boolean var, (true, false, or 0,1).

So:
if boolean var == true then
--do something
else
--do nothing or something else
end

3com
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics

PM
Tarkus1971
Audio Media Maker
9
Years of Service
User Offline
Joined: 24th Feb 2015
Location: England, UK
Posted: 7th Apr 2016 14:14
cool thanks 3com, Corno_1

Is there a Lua command to check if a sound is playing or not playing, I can't seem to find this in the documentation, (A sound in slot 0 or 1 and not music) ?

Aftershock Quad Core AMD FM2+ 3.5 GHz 8GB Motherboard and Processor, A7700k apu, AMD HD7870 gfx card.
King Korg Synth, Alesis SR18 Drum Machine, Akai MPX8 sample player, Roland Fantom XA Synth, Axus Digital AXK2 Digital Drum Kit.
3com
10
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 7th Apr 2016 15:15
I afraid there is not yet, just something seemed, but something tell me than this is not what you are looking for.
Quote: "PlaySoundIfSilent(e,v) - Plays a sound if NOT currently playing
Play the sound stored in the specified slot (v) as defined in entity properties if not playing which can be 0 or 1."


Some sort of "IsPlayingMusic=0" or "IsPlayingSound=0", would be nice.

3com
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics

PM
Tarkus1971
Audio Media Maker
9
Years of Service
User Offline
Joined: 24th Feb 2015
Location: England, UK
Posted: 9th Apr 2016 08:12
yes i need a command to a sound that is stopped when i destroy that entity emitting a sound.

there is StopSound(e,v) but this appears not to work.
Aftershock Quad Core AMD FM2+ 3.5 GHz 8GB Motherboard and Processor, A7700k apu, AMD HD7870 gfx card.
King Korg Synth, Alesis SR18 Drum Machine, Akai MPX8 sample player, Roland Fantom XA Synth, Axus Digital AXK2 Digital Drum Kit.

Login to post a reply

Server time is: 2024-12-22 15:26:16
Your offset time is: 2024-12-22 15:26:16