Scripts / text displayed / always active?

Author
Message
nuncio
GameGuru TGC Backer
9
Years of Service
User Offline
Joined: 28th Jan 2015
Location: Schleswig Holstein, Germany
Posted: 10th Oct 2015 00:11
hi there! i have a script to blow up 6 objects to be allowed to open a door. it is working but i have a question. to activate the script the player walks over a trigger zone and as long as the player stands on the trigger zone you can read

"Blow up all piles of ant eggs! " .. 6 - KillCount .. " left"

this is working but i would like to have this text displayed all the time until i finish the task. how can i make this? i can't put the trigger zone to always active and when i try to put the script into an antity i must walk over it doesn't start.
http://www.nuncio-rap.de
intel core i5-3570K CPU @ 3.40GHz; 8GB RAM // NVIDIA GeForce GTX560Ti
Inertia
8
Years of Service
User Offline
Joined: 12th Jul 2015
Location: SoCal, USA
Posted: 10th Oct 2015 06:44
Hi Nuncio, if you look at the scripts in scriptbank\stories\Cartoon Antics you will see how to handle this situation.

Good luck!

“C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg.”
--Bjarne Stroustrup
PM
nuncio
GameGuru TGC Backer
9
Years of Service
User Offline
Joined: 28th Jan 2015
Location: Schleswig Holstein, Germany
Posted: 11th Oct 2015 18:43


this is the script that i use. i took a look at "coindisplay.lua" from the cartoon level where there is this:



so do i see this right that i could solve my problem by changing the lines like this:


if g_Entity[e]['plrinzone']==1 then
if KillCount < 6 then
Prompt ( "Blow up all piles of ant eggs! " .. 6 - KillCount .. " left" )
end

remove the red??
http://www.nuncio-rap.de
intel core i5-3570K CPU @ 3.40GHz; 8GB RAM // NVIDIA GeForce GTX560Ti
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 11th Oct 2015 19:36
it depends when you want the message to appear, if you remove that line then it'll be on the screen all the time and thus maybe before you actually want it to be.

something like this might help (set it on an object the player will walk near to start the quest and make it always active)

life\'s one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, AMD R9 200 series , directx 11
nuncio
GameGuru TGC Backer
9
Years of Service
User Offline
Joined: 28th Jan 2015
Location: Schleswig Holstein, Germany
Posted: 12th Oct 2015 07:22
ah ok thanks! i replaced the content of the file "supplydumb.lua" with what you wrote there. i will try it when i'm home. the text may appear right at the beginning of the level that would be okay, but i also should disappear when i destroyed all ant eggs OR when i walk thru the door and it ends.
http://www.nuncio-rap.de
intel core i5-3570K CPU @ 3.40GHz; 8GB RAM // NVIDIA GeForce GTX560Ti
nuncio
GameGuru TGC Backer
9
Years of Service
User Offline
Joined: 28th Jan 2015
Location: Schleswig Holstein, Germany
Posted: 13th Oct 2015 11:50
@smallg: this doesn't seem to work. the script doesn't start or the text doesn't appear when i do so and when i blow up the first pile of eggs GG crashes.
i removed the line from my original script and now it works but the text is still not displayed all the time. just in the beginning and somewhen it's gone again.
http://www.nuncio-rap.de
intel core i5-3570K CPU @ 3.40GHz; 8GB RAM // NVIDIA GeForce GTX560Ti

Login to post a reply

Server time is: 2024-05-05 03:51:38
Your offset time is: 2024-05-05 03:51:38