UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

Easter Egg Help!

broken avatar :(
Created 11 years ago
by FLUXtrance
0 Members and 1 Guest are viewing this topic.
1,858 views
broken avatar :(
×
broken avatar :(
Location: usColorado
Date Registered: 13 June 2013
Last active: 7 years ago
Posts
40
Respect
Forum Rank
Legless Crawler
Primary Group
Member
My Contact & Social Links
More
Signature
×
FLUXtrance's Groups
First off, I will try to be as specific as possible. The Easter Egg I want to achieve is fairly simple, but seeing as I know very little of scripting much outside of the basics, I'll need some help. I'll give whoever is willing to help me full credit for their work. Thanks!

I would like to make a simple 5-piece Easter Egg. I have created a "tiki charm" prefab out of small brushes, and custom textures to be my "targets", and they are scattered throughout my map. I have also created a "tiki charm temple" (If you haven't guessed already my map is tropical themed). In the temple are important things such as the final teleporter to my map, a buyable ending, and PAP. I already have a text string display at the beginning of the map briefing the player on what he/she needs to do, here's where I need someones help:

How would I go about:

 -Creating a text string pop up when near a trigger on the charm saying "Hold (x) to Activate Tiki Charm"
 -Once all charms are active, open a door

EXTRA:

 -once all charms are active, create the hissing sound and screen shaking just like when activating the 3rd telporter on a Der Riese - Style map (I already have teleportes, the script is all there, would it be as simple as a copy/paste?)
 -A small counter on the HUD created when 1 of 5 tiki charms have been activated, and destroyed once all 5 have been activated

Thank you in advanced for reading if you got this far, I appreciate it. Like I said, any help would be much appreciated, and the two extras were merely out of curiosity of their difficulty to implement. If anyone thinks they can help me with this, I'd love to credit you for your work. Thank You! :D
broken avatar :(
×
broken avatar :(
Location: de
Date Registered: 6 August 2012
Last active: 4 years ago
Posts
277
Respect
Forum Rank
Mr. Elemental
Primary Group
Community Scripter Elite
My Groups
More
×
YaPh1l's Groups
Community Scripter Elite Has shown excellence and experience in the area of custom scripting in the UGX-Mods community.
YaPh1l's Contact & Social Links
-Creating a text string pop up when near a trigger on the charm saying "Hold (x) to Activate Tiki Charm"
Sounds like you just want a normal trigger_use.
-Once all charms are active, open a door
You'll need a custom script for that obviously. The other two things would be additions to that script basically.
Here's a basic script that I threw together from scratch, no guarantees, I'm not on my dev machine and can't test:
Code Snippet
Plaintext
#include common_scripts\utility;
#include maps\_utility;
#include maps\_zombiemode_utility;

init()
{
    trigs = GetEntArray("tiki_charm", "targetname");
    array_thread(trigs, ::tiki_trigger_think);
    level thread tiki_watcher(trigs.size);
}

tiki_trigger_think()
{
    self waittill("trigger");
    level notify("tiki_charm_hit");
    self Delete();
}

tiki_watcher(num)
{
    for(i = 0; i < num; i++)
        level waittill("tiki_charm_hit");
    door = GetEnt("tiki_door", "targetname");
    door NotSolid();
    door ConnectPaths();
    door MoveZ(-200, 2);
    door waittill("movedone");
    door Delete();
}
trigger_use of tiki charms: targetname = tiki_charm
Door: targetname = tiki_door

- Phil.
broken avatar :(
×
broken avatar :(
Location: usColorado
Date Registered: 13 June 2013
Last active: 7 years ago
Posts
40
Respect
Forum Rank
Legless Crawler
Primary Group
Member
My Contact & Social Links
More
×
FLUXtrance's Groups
Sounds like you just want a normal trigger_use.You'll need a custom script for that obviously. The other two things would be additions to that script basically.
Here's a basic script that I threw together from scratch, no guarantees, I'm not on my dev machine and can't test:
Code Snippet
Plaintext
#include common_scripts\utility;
#include maps\_utility;
#include maps\_zombiemode_utility;

init()
{
    trigs = GetEntArray("tiki_charm", "targetname");
    array_thread(trigs, ::tiki_trigger_think);
    level thread tiki_watcher(trigs.size);
}

tiki_trigger_think()
{
    self waittill("trigger");
    level notify("tiki_charm_hit");
    self Delete();
}

tiki_watcher(num)
{
    for(i = 0; i < num; i++)
        level waittill("tiki_charm_hit");
    door = GetEnt("tiki_door", "targetname");
    door NotSolid();
    door ConnectPaths();
    door MoveZ(-200, 2);
    door waittill("movedone");
    door Delete();
}
trigger_use of tiki charms: targetname = tiki_charm
Door: targetname = tiki_door

- Phil.

I appreciate the reply phil! Fortunately, with the help of another scripter, I got a working script now. It's actually fairly similar to yours, and basically works the same way. Thanks for your help though!

 
Loading ...