Welcome to Open Carnage

A resource for Halo 1 modding and tech, with unique means of rewarding individual content creation and support. Have a wander to see why we're worth the time! EST. 2012

Search the Community: Showing results for tags 'Dev Utility'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Site Discussions
    • Information & Announcements
    • Questions & Suggestions
    • Member Introductions
  • Halo CE Discussions
    • Halo CE: General
    • Halo CE: Development
    • TiaraCE
  • SAPP Discussions
    • SAPP: General
    • SAPP: Scripts
    • SAPP: Script Requests
  • Halo PC Discussions
    • Halo PC: General
    • Halo PC: Development
  • MCC Discussions
    • Master Chief Collection
  • Broad Discussions
    • General Gaming
    • Tech Chatter
    • Off-Topic

Calendars

There are no results to display.


Found 4 results

  1. I figured since I couldn't find a command to do this in SAPP's documentation, and I needed it heavily in the mod I am working on, I thought it'd be a nice utility function to release: function getDistance(Player1, Player2) --returns the distance between two players Player1X = get_var(Player1, "$x") Player1Y = get_var(Player1, "$y") Player1Z = get_var(Player1, "$z") Player2X = get_var(Player2, "$x") Player2Y = get_var(Player2, "$y") Player2Z = get_var(Player2, "$z") local diffX = Player1X - Player2X --x1-x2 diffX = diffX * diffX--((x1-x2)^2) local diffY = Player1Y - Player2Y diffY = diffY * diffY local diffZ = Player1Z - Player2Z diffZ = diffZ * diffZ local sum = diffX + diffY + diffZ return math.sqrt(sum) end
  2. Saves map scenario scripts to a txt file. Based on Halo Script Extractor.exe by Skarma Added indentation to make scripts easier to read Fixed non static/stub scripts by removing return type Fixed empty variables by adding quotations Fixed variables with spaces by adding quotations Fixed executing static void scripts within other scripts Example output - bigass.map Download: http://pastebin.com/5cYveEvX
  3. Note: By itself, this script does nothing. This script's functionality is intended to be included in other scripts, only. This script relies on the Weapons List, Powerups, and Multiplayer Information Vehicles in the globals tag. Halo uses this list to determine what weapon is what when using a non-default weapon set in a gametype (ITEM OPTIONS -> WEAPON SET). This method should bypass all forms of map protections as long as this list isn't modified. Many custom maps with custom tag sets are not ordered correctly, so some values will not be as they are expected if this is the case. You may notice that these custom maps may work weirdly when you use a non-stock weapon set in the gametypes settings. If the function fails (invalid list size or a multiplayer map isn't loaded), it will return nil. Otherwise it'll return a table with each key corresponding to a map's tag ID. These tag IDs can be used for spawning objects, object comparisons, and with the lookup_tag() function. { ["assault_rifle"] = number, -- weap: weapons\assault rifle\assault rifle ["flamethrower"] = number, -- weap: weapons\flamethrower\flamethrower ["gravity_rifle"] = number, -- weap: weapons\gravity rifle\gravity rifle ["needler"] = number, -- weap: weapons\needler\needler ["pistol"] = number, -- weap: weapons\pistol\pistol ["plasma_pistol"] = number, -- weap: weapons\plasma pistol\plasma pistol ["plasma_rifle"] = number, -- weap: weapons\plasma rifle\plasma rifle ["rocket_launcher"] = number, -- weap: weapons\rocket launcher\rocket launcher ["shotgun"] = number, -- weap: weapons\shotgun\shotgun ["sniper_rifle"] = number, -- weap: weapons\sniper rifle\sniper rifle ["frag_grenade"] = number, -- eqip: weapons\frag grenade\frag grenade ["plasma_grenade"] = number, -- eqip: weapons\plasma grenade\plasma grenade ["plasma_cannon"] = number, -- weap: weapons\plasma_cannon\plasma_cannon ["mp_needler"] = number, -- weap: weapons\needler\mp_needler ["ball"] = number, -- weap: weapons\ball\ball ["flag"] = number, -- weap: weapons\flag\flag ["active_camouflage"] = number, -- eqip: powerups\active camouflage ["double_speed"] = number, -- eqip: powerups\double speed ["full_spectrum_vision"] = number, -- eqip: powerups\full-spectrum vision ["overshield"] = number, -- eqip: powerups\over shield ["health_pack"] = number, -- eqip: powerups\health pack ["mp_warthog"] = number, -- vehi: vehicles\warthog\mp_warthog ["ghost_mp"] = number, -- vehi: vehicles\ghost\ghost_mp ["scorpion_mp"] = number, -- vehi: vehicles\scorpion\scorpion_mp ["banshee_mp"] = number, -- vehi: vehicles\banshee\banshee_mp ["c_gun_turret_mp"] = number, -- vehi: vehicles\c gun turret_mp\c gun turret_mp ["rwarthog"] = number -- vehi: vehicles\rwarthog\rwarthog } For your convenience, spaces and hyphens have been replaced with underscores. Download source: get_map_ids.lua
  4. Note: By itself, this script does nothing. This script's functionality is intended to be included in other SAPP scripts, only. read_global_value will return true/false for booleans, floats for real numbers, shorts for shorts, longs for longs, and dwords for everything else. It will return nil if the global could not be found. All globals are map-specific, so make sure the current map has it. Syntax is: read_global_value("global_name") For those of you who don't know what a global is, a global is a variable reserved for Halo scripts (scripts that are compiled within maps). Globals can be freely modified by Halo scripts, or by the set command. Feel free to include this in any script you make. I have tested this script on both Halo PC and Halo CE, and it should work on both. Let me know if there are any issues. Download (SAPP only): globals.lua