Scripts / Change entity from static mode to non static with plrinzone.

Author
Message
Peri
Game Guru Backer
14
Years of Service
User Offline
Joined: 6th Jan 2010
Location:
Posted: 24th Mar 2017 00:31 Edited at: 24th Mar 2017 00:33
Hi guys I made some tries with the plrinzone, lets say I setting a entity to static in his editor menu, and at the game when the player will enter the trigger zone, the entity will change to non static, I tried to add the line "SetNonStatic(e)" to the plrinzone.

My goal is to place a police car in a place the player was before and need to back there, for the siren I am using 3d sound script that I found in the forum "soundbinau3", I puted the script on the police car entity cause zones must to appear at the start of the level not like entities,

so I setting the police to spawn at the start to no, at the running level the model is invisible but the sound is playing, but when I setting the the car to static mode the sound inst playing, so maybe the solution is with the static mode and non static, also I need to find a way to do it with the flashing lights.

What do you suggest?

https://www.youtube.com/watch?v=aLbovGjNM3E&feature=youtu.be

Attachments

Login to view attachments
Corno_1
GameGuru Tool Maker
13
Years of Service
User Offline
Joined: 3rd Nov 2010
Location:
Posted: 27th Mar 2017 21:17
you can not switch from static to dynamic. It is better to activate you script with plrinzone.lua in a triggerzone and suround your script with
if g_Entity[e]['activated']==1 then
...
your script here
...
end

you must write the name of your entity in the ifused field of the triggerzone. Thats it. Do the same with the lights.
My dream is to develope games, which makes fun when I create it and fun when other people play it.
PM

Login to post a reply

Server time is: 2024-04-23 11:26:45
Your offset time is: 2024-04-23 11:26:45