Im not sure what I've done I may have deleted something accidentally but long story short I can compile and build the map but then I go to launch it on BO3 it crashed and gives me this error ****1 script error(s): "D15f3cea" with no parameters in "Scripts/zm/zm_mapname.gsc" at line 0**** ****Unresolved external "D15f3cea" with 0 parameters in "Scripts/zm/zm_mapname.gsc****
Can anyone tell me which this means
Looks like theres a string of random text in your zm_mapname.gsc "D15f3cea" at the top of the file. Open that file and delete that text, or post a copy of your zm_mapname.gsc here and I'll take a look. It may be something else altogether though, because it's saying the error is on line 0, not line 1 or higher. Don't know how 'line 0' exists, but whatever I'll check it out if you're still trying to fix it. Other option is start a new map. Sucks, but at least you can move forward.
I don't know what you mean by not confident, but at the bottom you have
Code Snippet
Plaintext
self waittill("pap_crafted")
. Why? Are you also sending a notify "pap_crafted"? Without doing
Code Snippet
Plaintext
player notify("pap_crafted")
the call
Code Snippet
Plaintext
self waittill("pap_crafted")
will halt the function and wait forever until that notify is sent. In the function part_shader_logic, 'self' is an alias for the player that the function is being called on.
So, you need to create your custom zombie in APE, there you can setup its life and strength, look about custom zombies in YouTube or some shit like that and hopefully you can setup this boss.
In your switch/case code, there's no need to have so much code in each "case" when you're calling the same functions in each, but only changing the variables (perk bottle, hintstring, and weapon). Just use a variable for each string, and then after all the case declarations run the functions once, then insert correct variables. Here's an example.
Code Snippet
Plaintext
switch(entity_num) { case 0; perk = "zombie_perk_bottle_revive"; //The bottle & weapon have the same name, only 1 var needed. hint = "revive soda"; break; case 1; perk = "zombie_perk_bottle_jug"; hint = "Juggernog"; break; case 2; perk = "zombie_perk_bottle_doubletap"; hint = "ze Root Beer"; break; case 3; perk = "zombie_perk_bottle_sleight"; hint = "Speed Cola"; break; }
perk_bottle SetModel(perk); level.w_trigger SetHintString("Press ^3&&1 ^7to get " + hint + "!"); self waittill("trigger", player); player GiveWeapon(perk); player SwitchToWeapon(perk); wait(3); player TakeWeapon(perk);
Makes code a lot shorter, easier to read, and it looks clean. Just my opinion.
If you need some custom models, let me know. I do all the texturing as well. No charge, just a credit. I also do a lot of scripting, so I could help you out.
If any mappers would like to use this robot, please comment below. I am willing to help you implement this in your map as well as adding features you may want
I've been working on this project for about a year, but off and on as I procrastinate and also have many behind the scenes unfinished projects. My main reason for posting this is I see a lot of potential with this mod, but I'm not that creative when it comes to mapping, so I thought I would see how many people/mappers are interested in using something like this in their map so all my work isn't for nothing. So far I have the state machine coded for the robot's animations, as well as a combat logic that handles enemy targeting and FX. Currently the robot will follow the player and dynamically shift focus on the nearest zombie within 500u of the robot.
Planned features:
The drone will pick up a single crawler and hold until killed, similar to leroy from BO2
The drone will focus on zombies closest to the owner, and have varied attacks, such as grabbing zombie's heads and pulling them off, grappling zombie's ankles & ragdoll-ing them, swinging them around & slamming
Adding in many more animations & creating a pool for each type. For example the default idle animation will have 5 variants that randomly play while in the idle state, so no animation will repeat
Scripting a complete buildable system for the robot, including the parts to initially acquire the drone, parts for it's laser-gun, and any parts for future mods/enhancements
The ability to revive downed player/teammates + buildable upgrade to keep all perks after robot revives
A cooldown system, to balance gameplay difficulty. I want this mod to be fun, not over-powered. Perhaps I could make a fuel system with a HUD for feedback (remaining fuel) Comment ideas on how to acquire fuel or other methods to balance!
Ability to grab nearby power-ups and bring them to the owner, similar to the BO2 tomahawk.
All ideas are welcome! Please comment below what you think.
Here is a video showing some of the earlier prototype models & animations
And here is the final prototype, fully textured & animation demo.
Here is an in-game demo of the current state of the robot's AI script
There are a few other prototypes that didn't get featured, but these should show the basic idea I had in the beginning and how it evolved as I gained experience with the various programs I used.
I have a decent script made that handles the robot's basic behaviors, and right now I'm re-doing the FX for the laser-fire -for the buildable laser-gun add-on. Everything in this project is custom, no borrowed scripts or models, textures or anything. The programs I used were mainly Blender for the modelling, Maya 2015 for the animations, Substance Painter 2 for the materials and Adobe Photoshop for the robot screen (face). If any mappers would like to use this, let me know below. I'd love to hear feedback, see if this thing is worth putting more time into or just putting on the shelf. Thanks for checking it out!
Here's the script so far if you're interested in how it works
function positionBot(player) { //Forward and to the right of players view f = AnglesToForward(player.angles) * 125; org = AnglesToRight(player.angles) * 40 + (f + (0,0,75)); return org; }
function robot_positioning_system(player) { while(1) { switch(self.robot.animState) { case "combat_idle": case "focus_atk": case "laser_atk":
case "idle": //If no zombies are in range, robot follows players direction angles = player GetPlayerAngles(); self.mover RotateTo(angles, .2); break; } wait(0.2); } }
I want to know if it is possible to attach a light to the players. I want to put in my map a buildable flashlight or just a simple flashlight. who can be used like a weapons or the sheild.
Thanks for your help.
You need to use an fx light, more info in your root/docsmodtools folder to set up the fx. I highly suggest creating your own fx in radiant. It's basically a bunch of settings you adjust, tutorials are out there. Once you have an fx light, you can link an empty to the player, then do PlayFXOnTag() on the empty. Check out my tutorial on buildables here https://ugx-mods.com/forum/index.php/topic,15031.0.html. You will also need a method for the player to toggle the flashlight. In the docsmodtools folder open the scriptapi html file, hit ctrl + f and search for buttonpressed(). That will give you hooks for keystrokes, so you can write a function to toggle the light. That plus adjusting the spawn position of the empty script_model and adjusting the angle of the light, color, etc.
I know you solved the issue, but I don't think you fully understand how while() loops work. Figured I'd explain a little to help you out.
Everything inside {curly braces} will loop forever until while(true) is evaluated as false - unless you call a break. It will work the way you're doing it (saw the pastebin, lol btw) however it is completely unnecessary if you call a wait() statement.
Basically, loops in general are intended to repeat or iterate a block of code until some condition is met. Logically if you're waiting() for a zone entrance, what code do you need to repeat? None. When you call waittill("zone_enter"), the script halts and does not process the next line until that notification is recieved, thus making a loop irrelevant. Then the next waittill("zone_enter") gets called and halts again until the player enters. So just get rid of the loop altogether, and write your code as normal. Ill give you a few examples for the sake of it. I'm no expert coder, but I can teach what I know.
Code Snippet
Plaintext
//This example counts 10 player slide actions, prints the total to the screen, then breaks out of the loop & ends the function. function example_loop() { slides = 0; max_slides = 10; players = GetPlayers(); player = players[0];
//This ex. uses a for() loop, counts & prints the array of zombies alive. You don't need a break statement as 'i' counts up with zombies.size. //Once 'i' is greater than zombies.size, then middle statement in the loop becomes false, breaking the loop. function example_loop2() { zombies = GetAISpeciesArray("axis", "all");
for(i = 0; i < zombies.size; i++) { IPrintLnBold("[" + i + 1 + "] zombies have been detected"); }
}
//Or you could do function example_loop3() { i = 0; foreach(zombie in GetAISpeciesArray("axis", "all")) { IPrintLnBold("[" + i + 1 + "] zombies have been detected"); i++; } }
you can move an FX, but what you will want to do is use the function named
Code Snippet
Plaintext
fx = playfxontag(id, ent, tag);
where 'id' is the FX id, ent is the script_model that you want to play the FX on, and tag is the model tag you where you want the FX attached. example:
Code Snippet
Plaintext
fx = PlayFxOnTag(level._effect["bouledefeu"], level.model, "tag_origin");
PS: if you ran it in developer mode you should have gotten an error saying "Type String is not an entity and cannot call EnableLinkTo"
Close, but no cigar. According to the api (root/docsmodtools/bo3_scriptapifunctions.html) search for playfxontag. I use a lot of custom fx in my projects and am familiar with this topic. Im on standby at work right now, but give me an hour and I'll give you (original poster) a proper example once I get home. (On mobile) Double Post Merge: November 29, 2017, 11:55:48 pm
//First, you need to pre-cache your fx file before init(). (Certain fx are pre-cached by default, there is a list in the forums here) #precache("fx", "Symbo/test3");
function init() { level flag::wait_till("initial_blackscreen_passed"); level._effect["bouledefeu"] = "Symbo/test3"; //Defining the fx
temp = struct::get("struct1", "targetname"); //In radiant, put a new struct where the skull moves to - name it "destination" destination = struct::get("destination", "targetname"); skull = Spawn("script_model", temp.origin); skull SetModel("p7_skulls_bones_head_02"); skull.destination = destination.origin;
temp Delete(); //If only using as an origin point - no longer needed destination Delete();
//level.model enablelinkto(); //level._effect["bouledefeu"] linkto(level.model); //***You do not call EnableLinkTo() on the fx ^ or the model here. The fx in gsc is only a string pointing to the fx file, //PlayFXOnTag() solves that, the fx will move with the model
function move_fx() { PlayFXOnTag(level._effect["bouledefeu"], self, "tag_origin"); //If you want to get fancy, you could make the skull look towards the destination point as it moves there //I wrote an easy function for that at the bottom of the page self face_target(self.destination); //Then move it there self MoveTo(self.destination, 2);
//If feeling extra fancy you could make the skull 'look' at the nearest player while(1) { players = GetPlayers(); searchDist = 500; //500 is the search distance for players - change as needed nearestPlayer = ArrayGetClosest(self.origin, players, searchDist);