I created a new method for calculating hit/miss shots for shooter type maps a while back. Simply, I compare the players camera angle with the angle between two points. The two points being the player controlled unit and the point of the potential target unit. If these angles are approximately the same, you are aiming in the direction of the target unit.
I wrote my method as galaxy script code, but I will walk you through the concepts.
First, I have a region which is always centered on my player ControlledUnitt.
When units enter the region, they are added to a player group of Targets.
When they leave or die, they are removed.
Next, when the player shoots, my "AngleMatch" function cycles through all of the units in this region that have been added to the group Targets.
It checks compares the CameraYaw with the value of the angle between two points (position of ControlledUnit, position of TargetUnit). If they match, just verify height.
That is the jist of the concept.
Advantages: Much faster execution than traceline.
Disadvantages: Collision detection : if no other methods are added, you can simply shoot through walls.
I'm wondering if the "unit leaves region" event will fire if I use triggers to move a region so that the unit no longer resides in this region. I'm asking because I have a region that peridocially moves to the location of a specified unit, and I use "unit enters" and "unit leaves" region to set an array of targets in that are currently in region. If I move the region, and the "unit leaves region" event does not fire, this would give false values of units currently in the region...
Hey, I did my own comparison using the hot keyed unit abilities (skill buttons) to capture the movement inputs and as well as key pressed events twice now. I first tested this a few months ago after I posted this idea on the forums and didn't get any responses. I tested it out again today with 4 people toggling between the two systems in game (on my map). Honestly, there was no noticeable or measurable difference either time. If anything the hotkey method is more annoying because it keeps playing that damn noise, and it clutters the screen because you can't disable that part of the UI. I guess the only way to test it fully would be to do it with a full lobby and toggle between the two in game. I'm willing to help test this out with a full lobby just pm me with time you want to test and I'll be on if I'm not working.
Besides that, your shooter is looking great, love the custom weapon models and new terrain :P, looking forward to fragging you.
I'm releasing a library I have been developing in my free time. It basically takes care of setting up your map to function as a FPS following the desired unit. This is still a work in progress, but it is definitely far enough along to be of some use to people. I have done some documentation that you will find in the library to try and explain how to utilize it. I will be working on creating functions that will appear in the GUI, but you can reference them with code for now.
I have uploaded the map file I have been using to test this and the library itself.
Refer to the link in my signature to view a video of an earlier version. You can test my map out on battle net by searching "Betrayal at New Gettysburg" to see online performance.
Additionally, I am looking for people to help me develop this so PM if you feel your qualified. :) Enjoy, and thank you SC2Mapster community for giving me the resources and Rrowland specifically for his tutorials.
I have created code within a library and have functions within my custom script that I want to be able to use on any map through the GUI as well as referencing them with code. Currently I can only get these to work with a custom script action. I plan on releasing this library to the public soon, but I want it to be easy for people to use and configure through the GUI. I know I could make functions with the GUI in my library and insert the custom script that calls my functions there, but I'd rather just have more direct access to these functions than tunnel through redundant functions.
Hello, I'm looking for a DATA EDITOR person to help me develop guns for my FPS map. I have created all the FPS system (camera, movement, shooting). I need help creating more weapons through the Data editor. I play on USEast, I am available most weekdays after 10pm US Central Time. I can communicate through skype or vent.
The map I'm currently working on is themed after the Kerrigan Betrayal CGI video cut scene. You play as Sarah Kerrigan (Nova) and fend off an onslaught of Zerg. This is meant to be a single player game as Blizzard's keyboard and mouse inputs over Battle Net need to be synchronized which results in massive lag. If they ever address this issue, I intended to develop this into a multiplayer FPS survival game. I'm developing this in my spare time as a hobby, if you would like to help me make some weapons I would really appreciate it. Refer to my signature for a video demonstrating what I've accomplished so far.
If you think you can help, please message me and show any previous work done :P.
I will try that today, but shouldn't it still apply the regular damage when the effect is executed from unit to unit? The splash damage would be effective when executed from unit to point.
Thanks a lot for your advice/suggestions. I was able to get the snipe effect and the Marauder grenade missile effects to work. With the grenade effect, it will only apply the damage to the unit when the impact location is setup as target unit only. If i change it to target unit/point it will not apply the damage. Any ideas?
To be short, I want to use the data editor to create an effect that deals damage to a unit and creates a projectile like animation. I want to use this with my FPS shooting system. The effect(s) will need to be cast from a unit to a target unit or target point. I know that the Archon attack works like this, but when I try alternative effects they usually don't work, or they don't animate correctly. I intend to execute these effects through triggers.
If someone could point me in the right direction, or give me a simple example on how to create even a prismatic beam attack that would be great.
Here is some example code from one of my projects a long time ago. I read and write to a file in the defined functions. Hope this helps
/* CSCI 201 Computer Science 1 Spring, 2010 Project 10 March 31 My Name Section 1 This program opens a data file containing the item numbers, item names, item quanititys, and item unit prices. Next, it sorts the items by item number, then calculates the total value of each item, and the total value of all items. */#include<cstdlib>#include<iostream>#include<iomanip>#include<fstream>usingnamespacestd;/* Struct: item Description: Contains an items reference number, quantity in the warehouse, unit price, total value, and name.*/structitem{intnum,amount;floatprice,val;charname[15];};/* Function: open_file Description: Opens an item file containing unorganized warehouse item information. Input: item array, count variable of items in array Output: None*/voidopen_file(itemobj[],int&c);/* Function: arrange_items Description: Arranges the warehouse items by item number. Input: item array, count variable of items in array Output: None*/voidarrange_items(itemobj[],intc);/* Function: calc_val Description: Calculates each individal item's total value, and returns the total value of all items. Input: item array, count variable of items in array Output: Total value of all items in warehouse*/doublecalc_val(itemobj[],intc);/* Function: write_file Description: Writes the warehouse item information to a file with organized by item number, and containing the additional calculated value, and total value of all items. Input: item array, count variable of items in array, total value Output: None*/voidwrite_file(itemobj[],intc,doubletotal);intmain(){itemobjects[100];// Array of itemsintcount=0;// Number of items in arraydoubletotal=0;// Total value of all items in arrayopen_file(objects,count);arrange_items(objects,count);total=calc_val(objects,count);write_file(objects,count,total);return0;}voidopen_file(itemobj[],int&c){ifstreamin_f;// Input file streamin_f.open("struct.txt");// Target file to open// Reads in information to item arraywhile(!in_f.eof()){in_f>>obj[c].num>>obj[c].name>>obj[c].price>>obj[c].amount;c++;}in_f.close();}voidarrange_items(itemobj[],intc){itemtemp;// Temporary storage while ordering itemsfor(intn=c-1;n>0;n--){for(intk=0;k<n;++k)if(obj[k].num>obj[k+1].num){temp=obj[k];obj[k]=obj[k+1];obj[k+1]=temp;}}}doublecalc_val(itemobj[],intc){doubletotal=0;// Initialize total to 0for(intn=0;n<c;++n){obj[n].val=obj[n].amount*obj[n].price;// Calculate total price*amounttotal+=obj[n].val;// Sum to total}returntotal;}voidwrite_file(itemobj[],intc,doubletotal){ofstreamout_f;// Output file streamout_f.open("inventory.txt");// Output file nameout_f<<"Number Name Unit Price Quantity Value"<<endl<<endl;// Write item informationfor(intn=0;n<c;++n){out_f<<obj[n].num<<setw(16)<<obj[n].name<<setw(11)<<obj[n].price<<setw(11)<<obj[n].amount<<setw(12)<<obj[n].val<<endl;}out_f<<endl<<"Total Value = $"<<total;out_f.close();}
Is there a way to create a button that issues a custom order. (in my case the order would be null)
I'm trying to create buttons that issue custom orders through hot keys, so i can catch them with triggers "unit has been issued ORDER" for wasd movement. Any help or direction would be appreciated.
I'm kind of new to mapping, but I was able to make a pretty decent FPS WASD, shooting system. I was thinking about using a WASD data system like programmers (in tutorials) and triggers to create a hybrid WASD system. This would use hotkeys causing the selected unit to be issued an order, and then this would be caught by a trigger event similar to regular key pressed. For example, "Unit - My Unit is issued an order to Move Up" as event, the action would be to update my system like I would if they event were just a "key pressed". The actual Move Up order would do nothing but flag the trigger. Then I would just use "key released" event to change my variable back to value that flags key released. This should in theory make the WASD movement more responsive on the front end. This is assuming that the round about event is faster then the regular key pressed event.
If you think this idea is feasible let me know since I'm not very experienced with this.
0
@AnOddRadish: Go
flattering,
you can test it on my map
search SlayerCraft on bnet, kill zombies have fun
0
I created a new method for calculating hit/miss shots for shooter type maps a while back. Simply, I compare the players camera angle with the angle between two points. The two points being the player controlled unit and the point of the potential target unit. If these angles are approximately the same, you are aiming in the direction of the target unit.
I wrote my method as galaxy script code, but I will walk you through the concepts.
First, I have a region which is always centered on my player ControlledUnitt. When units enter the region, they are added to a player group of Targets. When they leave or die, they are removed.
Next, when the player shoots, my "AngleMatch" function cycles through all of the units in this region that have been added to the group Targets. It checks compares the CameraYaw with the value of the angle between two points (position of ControlledUnit, position of TargetUnit). If they match, just verify height.
That is the jist of the concept.
Advantages: Much faster execution than traceline.
Disadvantages: Collision detection : if no other methods are added, you can simply shoot through walls.
0
I'm wondering if the "unit leaves region" event will fire if I use triggers to move a region so that the unit no longer resides in this region. I'm asking because I have a region that peridocially moves to the location of a specified unit, and I use "unit enters" and "unit leaves" region to set an array of targets in that are currently in region. If I move the region, and the "unit leaves region" event does not fire, this would give false values of units currently in the region...
0
Hey, I did my own comparison using the hot keyed unit abilities (skill buttons) to capture the movement inputs and as well as key pressed events twice now. I first tested this a few months ago after I posted this idea on the forums and didn't get any responses. I tested it out again today with 4 people toggling between the two systems in game (on my map). Honestly, there was no noticeable or measurable difference either time. If anything the hotkey method is more annoying because it keeps playing that damn noise, and it clutters the screen because you can't disable that part of the UI. I guess the only way to test it fully would be to do it with a full lobby and toggle between the two in game. I'm willing to help test this out with a full lobby just pm me with time you want to test and I'll be on if I'm not working.
Besides that, your shooter is looking great, love the custom weapon models and new terrain :P, looking forward to fragging you.
0
I'm releasing a library I have been developing in my free time. It basically takes care of setting up your map to function as a FPS following the desired unit. This is still a work in progress, but it is definitely far enough along to be of some use to people. I have done some documentation that you will find in the library to try and explain how to utilize it. I will be working on creating functions that will appear in the GUI, but you can reference them with code for now.
I have uploaded the map file I have been using to test this and the library itself.
http://www.sc2mapster.com/maps/red-engine-demo-fps-library/
Refer to the link in my signature to view a video of an earlier version. You can test my map out on battle net by searching "Betrayal at New Gettysburg" to see online performance.
Additionally, I am looking for people to help me develop this so PM if you feel your qualified. :) Enjoy, and thank you SC2Mapster community for giving me the resources and Rrowland specifically for his tutorials.
0
I have created code within a library and have functions within my custom script that I want to be able to use on any map through the GUI as well as referencing them with code. Currently I can only get these to work with a custom script action. I plan on releasing this library to the public soon, but I want it to be easy for people to use and configure through the GUI. I know I could make functions with the GUI in my library and insert the custom script that calls my functions there, but I'd rather just have more direct access to these functions than tunnel through redundant functions.
Thanks!
0
Hello, I'm looking for a DATA EDITOR person to help me develop guns for my FPS map. I have created all the FPS system (camera, movement, shooting). I need help creating more weapons through the Data editor. I play on USEast, I am available most weekdays after 10pm US Central Time. I can communicate through skype or vent.
The map I'm currently working on is themed after the Kerrigan Betrayal CGI video cut scene. You play as Sarah Kerrigan (Nova) and fend off an onslaught of Zerg. This is meant to be a single player game as Blizzard's keyboard and mouse inputs over Battle Net need to be synchronized which results in massive lag. If they ever address this issue, I intended to develop this into a multiplayer FPS survival game. I'm developing this in my spare time as a hobby, if you would like to help me make some weapons I would really appreciate it. Refer to my signature for a video demonstrating what I've accomplished so far.
If you think you can help, please message me and show any previous work done :P.
0
@DrSuperEvil: Go
I will try that today, but shouldn't it still apply the regular damage when the effect is executed from unit to unit? The splash damage would be effective when executed from unit to point.
0
Thanks a lot for your advice/suggestions. I was able to get the snipe effect and the Marauder grenade missile effects to work. With the grenade effect, it will only apply the damage to the unit when the impact location is setup as target unit only. If i change it to target unit/point it will not apply the damage. Any ideas?
0
To be short, I want to use the data editor to create an effect that deals damage to a unit and creates a projectile like animation. I want to use this with my FPS shooting system. The effect(s) will need to be cast from a unit to a target unit or target point. I know that the Archon attack works like this, but when I try alternative effects they usually don't work, or they don't animate correctly. I intend to execute these effects through triggers.
If someone could point me in the right direction, or give me a simple example on how to create even a prismatic beam attack that would be great.
Thanks,
0
Here is some example code from one of my projects a long time ago. I read and write to a file in the defined functions. Hope this helps
0
@JademusSreg: Go
no, this would not use TriggerAddEventKeyPressed, but TriggerAddEventUnitOrder
0
Is there a way to create a button that issues a custom order. (in my case the order would be null)
I'm trying to create buttons that issue custom orders through hot keys, so i can catch them with triggers "unit has been issued ORDER" for wasd movement. Any help or direction would be appreciated.
0
Idea for less laggy b net FPS
I'm kind of new to mapping, but I was able to make a pretty decent FPS WASD, shooting system. I was thinking about using a WASD data system like programmers (in tutorials) and triggers to create a hybrid WASD system. This would use hotkeys causing the selected unit to be issued an order, and then this would be caught by a trigger event similar to regular key pressed. For example, "Unit - My Unit is issued an order to Move Up" as event, the action would be to update my system like I would if they event were just a "key pressed". The actual Move Up order would do nothing but flag the trigger. Then I would just use "key released" event to change my variable back to value that flags key released. This should in theory make the WASD movement more responsive on the front end. This is assuming that the round about event is faster then the regular key pressed event.
If you think this idea is feasible let me know since I'm not very experienced with this.
0
Thanks, that worked like a charm,
now if i wanted to make the animation quicker, would i change the tracking time?