UGX-Mods

Call of Duty 5: World at War => Downloadable Items for Mappers => Custom Maps, Mods & Tools => Scripts => Topic started by: MakeCents on May 27, 2016, 04:29:02 am

Title: No Triggers Needed, Hintstring icons, and EE Hint Images and Messages
Post by: MakeCents on May 27, 2016, 04:29:02 am
No Triggers Needed, Hintstring icons, and EE Hint Images and Messages



Information
You can add images under your hintstring, ee hint images, and messages, to tell a story, or to give clues for the next step in your ee.

This script can replace the need for a trigger and an ent. The script can be used directly on an ent or struct without a trigger. It can also be used with the trigger, since a trigger is an ent.
Why?
Well, it reduces the amount of interactive ents in your map at a given time, hopefully helping prevent g-spawn.

This script requires a little menu editing, instructions in script, because I chose that for the hintstring instead of a hud, and you can't do your typical sethintstring this way either. (And you can't use the &"strings" either) I set it up so it already says press & hold "your use button", and you just tell it the rest. I made an adjustable argument if you have jump or crouch to see the hint, that can be used to adjust the z.

Features:

 - Use less ents if desired
 - images under hintstring
 - ee hint images
 - ee hints under images

This can be used on wall weapons, doors, ees, and any place you want to trigger an event... to help get you in under the limits or just to add hints or a story line to your map. If you want any help trying to modify it to meet your needs, or incorporate it in some way, just hit me up.

Instructions

 - Add mc_mod folder to your mods/mapname/maps folder
 - Edit your hud.menu, copy/paste code below (please read and see example if needed)
 - Add #include maps\mc_mod\_mc_NoTriggers; to the top of any gsc you want to use this in
 - Add one of the two available functions where ever you want to use it, or replace your waittill triggers like in the example included in the dl.
 - If using images, add material,name for each material you converted (see examples for sizing), to your mod.csv
 - Add iwi's for materials to your mods/mapname/images folder
 - Build mod with checkbox on new script and new images
Code Snippet
Plaintext

/*
#####################
by: M.A.K.E C E N T S
#####################

Place the following at the top of the gsc you want to use functions from this in it
#include maps\mc_mod\_mc_NoTriggers;

in your script use one of the following two functions:
player = trigger NTwaittill(<hint>,<icon>,<message>,<messagehint>,<offsetter>);//replaces trigger waittill("trigger", player);
<hint> - hint for trigger
<icon> - (optional) The icon/material to put under the hintstring
<message> - (optional) The material for the image that pops up
<messagehint> - (optional) The hint under the image
<offsetter> - (optional) The ammount to offset the z axis if necessary

player ShowMessage(<message>,<messagehint>,<onetime>,<timer>);//add to show a message to the player at any time
<message> - The material for the image that pops up
<messagehint> - The hint under the image
<onetime> - (optional) The hint under the image
<timer> - (optional) How long to keep the hint up

In hud.menu for your map find competitivemodescores and add this to that menuDef:
itemDef
{
name "hintstring"
rect 100 70 40 40 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER
textscale TEXTSIZE_SMALL
textstyle ITEM_TEXTSTYLE_SHADOWED
textfont UI_FONT_OBJECTIVE
textalign ITEM_ALIGN_CENTER
forecolor 1 1 1 1
exp text ("Press & hold " + KeyBinding("+activate") + dvarString("hintstring"))
visible when (dvarString("hintstring") != "The power must be activated first" && dvarString("hintstring") != "");
decoration
}
itemDef
{
name "gunicon"
rect 50 90 100 40 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER
forecolor 1 1 1 .8
ownerdraw CG_PLAYER_WEAPON_BACKGROUND
exp material dvarString("gunicon");
visible when (dvarString("gunicon") != "")
decoration
}
itemDef
{
name "mcmessage"
// rect (WEAPINFO_X +122) (WEAPINFO_Y +5) 24 24
rect 0 220 96 96 HORIZONTAL_ALIGN_RIGHT VERTICAL_ALIGN_TOP
forecolor 1 1 1 .8
ownerdraw CG_PLAYER_WEAPON_BACKGROUND
exp material dvarString(mcmessage);
visible when ( dvarstring(mcmessage) != "");
decoration
}
itemDef
{
name "mchintstring"
rect 0 335 96 96 HORIZONTAL_ALIGN_RIGHT VERTICAL_ALIGN_TOP
textscale .25
textstyle ITEM_TEXTSTYLE_SHADOWED
textfont UI_FONT_OBJECTIVE
textalign ITEM_ALIGN_RIGHT
forecolor 1 1 1 1
exp text dvarString("mchintstring")
visible when (dvarString("mchintstring") != "");
decoration
}

###############################################################################
*/
Title: Re: Remove/Replace Trigger Use to free up ents
Post by: death_reaper0 on May 27, 2016, 05:03:36 am
thanks this could be useful for me since i use tons of triggers  ;D +1
Title: Re: Remove/Replace Trigger Use to free up ents
Post by: MakeCents on May 27, 2016, 12:55:18 pm
thanks this could be useful for me since i use tons of triggers  ;D +1

Cool. I created it for ORBiT since my ents started getting pretty high when building the center part. I removed bump triggers from the perk machines, and many other things, but ended up still too high. This dropped me down like 100 ents.
Title: Re: No Triggers Needed, Hintstring icons, and EE Hint Images and Messages
Post by: MakeCents on June 15, 2016, 03:35:40 am
Updated script with other features
Title: Re: No Triggers Needed, Hintstring icons, and EE Hint Images and Messages
Post by: Harry Bo21 on June 15, 2016, 08:25:49 am
Good stuff bro
Title: Re: No Triggers Needed, Hintstring icons, and EE Hint Images and Messages
Post by: Fancygamer1738 on March 25, 2018, 07:47:44 pm
THANK YOU SO MUCH!!! I started running up on my limits a couple days ago and considered cutting content, but now I don't have to.  8)
Title: Re: No Triggers Needed, Hintstring icons, and EE Hint Images and Messages
Post by: fra98_ on December 09, 2022, 03:28:23 pm
I'm trying to apply your guide to fix nazi_zombie_ragnarok g_spawn error but I'm failing miserably, are you still active here?