Einherj
Member-
Content Count
28 -
Joined
-
Last visited
-
Medals
Everything posted by Einherj
-
UV animations, texture tiling and shaders
Einherj posted a topic in ARMA 3 - ADDONS - CONFIGS & SCRIPTING
I've been playing around with the UV animations, specifically the UV scaling. The problem is, that it's kind of useless since the default shader doesn't tile the texture, but stretches the edges. Is there a shader that does tile / wrap / repeat the texture? http://skipgo.net/arma3/screenshots/UV_scale_issue_1.png -
I'm trying to get an event to trigger when a weapon is fired. I have added an EventHandlerManagerComponent and then my own scripted component (code below) to a cloned m16 weapon entity. The "weapontestPOSTINIT", "weapontestEINIT" and "weapontestADDEVENT" are all printed after initialization. However, when I pick up the weapon and fire it, the event method is not run and "testEVENT" is not printed. What's wrong with my setup? class EHJ_WeaponEventComponentClass:ScriptComponentClass {}; class EHJ_WeaponEventComponent: ScriptComponent { private EventHandlerManagerComponent m_EventHandlerManagerComponent; override protected void OnPostInit(IEntity owner) { super.OnPostInit(owner); owner.SetFlags(EntityFlags.ACTIVE, true); SetEventMask(owner, EntityEvent.ALL); Print("weapontestPOSTINIT"); } override protected void EOnInit(IEntity owner) { Print("weapontestEINIT"); m_EventHandlerManagerComponent = EventHandlerManagerComponent.Cast(owner.FindComponent(EventHandlerManagerComponent)); if (m_EventHandlerManagerComponent) { m_EventHandlerManagerComponent.RegisterScriptHandler("OnAmmoCountChanged", this, this.Event_OnAmmoCountChanged, true); Print("weapontestADDEVENT"); } } void ~EHJ_WeaponEventComponent() { if (m_EventHandlerManagerComponent) m_EventHandlerManagerComponent.RemoveScriptHandler("OnAmmoCountChanged", this, this.Event_OnAmmoCountChanged, true); } void Event_OnAmmoCountChanged(BaseWeaponComponent currentWeapon, BaseMuzzleComponent currentMuzzle, BaseMagazineComponent magazine, int ammoCount, bool isChambered) { Print("testEVENT"); } };
-
UV animations, texture tiling and shaders
Einherj replied to Einherj's topic in ARMA 3 - ADDONS - CONFIGS & SCRIPTING
The problem was the UV map. The UVs have to be mapped across the UV borders so that, in the case of a square, all the vertices are at (0.5, 0.5). See the following screenshot. http://skipgo.net/arma3/screenshots/UV_anim_map_correct_1.png -
UV animations, texture tiling and shaders
Einherj replied to Einherj's topic in ARMA 3 - ADDONS - CONFIGS & SCRIPTING
Here's the same with a cube's face. http://skipgo.net/arma3/screenshots/UV_scale_issue_2.png Each face is UV mapped to the whole texture. There is only one selection which is the whole cube. When I scale the UV, I expect the texture to repeat, but it just repeats the texture's edge pixels. -
Couldn't find a thread about this on the ArmA 3 categories. I'm trying to use the old Radio or GPS models which were used in previous ArmA installations (and are still included in ArmA 3, but not used) and display dialog controls on their display areas but I'm having no luck. I can get the radio model to display but can't get any controls to show on it's surface. Here's my code from my mission's description.ext: class Dialog3DTest { idd = -1; movingEnable = true; controlsBackground[] = {}; class Objects { class RadioTest { access = ReadAndWrite; scale = 0.5; direction[] = {0,1,0}; up[] = {0,0,-1}; shadow = 1; idc = 101; type = 80; model = "\A3\ui_f\objects\radio.p3d"; selectionDate1 = "date1"; selectionDate2 = "date2"; selectionDay = "day"; x = 0.5; xBack = 0.5; y = 0.5; yBack = 0.5; z = 0.22; zBack = 0.22; inBack = 0; enableZoom = 0; zoomDuration = 1; waitForLoad = 0; class Areas { class Papir { class controls { class ControlTest { idc = 66; type = 0; style = 0; x = 0; y = 0; w = 1; h = 1; colorBackground[] = {0, 0, 0, 0}; colorText[] = {1, 1, 1, 1}; font = "PuristaMedium"; sizeEx = 0.4; linespacing = 1; text = "Control Test"; tooltipColorText[] = {1, 1, 1, 1}; tooltipColorBox[] = {1, 1, 1, 1}; tooltipColorShade[] = {0, 0, 0, 0.65}; shadow = true; colorShadow[] = {0, 0, 0, 0.5}; }; }; }; }; }; }; class Controls { }; }; Has anyone done this in ArmA 3? Do you have any suggestions what I should try? Thank you for your interest.
-
Dialog controls on 3D object surface
Einherj replied to Einherj's topic in ARMA 3 - MISSION EDITING & SCRIPTING
That might be it. That's how it's done in the BIS models. -
Dialog controls on 3D object surface
Einherj replied to Einherj's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hi Sacha, You need four vertices in the Memory LOD each representing a corner of the screen area. In my example they would be named "papir tl", "papir tr", "papir bl" and "papir br". tl is for Top Left, tr for Top Right, bl for Bottom Left and br for Bottom Right. I hope that helps. -
Dialog controls on 3D object surface
Einherj replied to Einherj's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I'm detecting color anomalies in some controls: buttons, editboxes, frames and backgrounds seem to be only rendered with primary colors (red, green, blue, yellow, cyan, magenta, black & white) nothing in between. Every value above zero in the color array is read as a one. Text and pictures are rendered normally in all possible colors. Also, map controls can't be rendered on the 3D surface. if you try to do it, the map is just rendered normally in 2D. -
Dialog controls on 3D object surface
Einherj replied to Einherj's topic in ARMA 3 - MISSION EDITING & SCRIPTING
You have to keep in mind that the model is rendered onto the GUI layer so it's not a world model. That's why it can not be rotated or moved with script commands - it's just a control container inside the dialog. Buttons and listboxes should work fine. -
Dialog controls on 3D object surface
Einherj replied to Einherj's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Got it working! Here's the class in description.ext: class Radio3DTestDialog { idd = -1; movingEnable = 0; enableSimulation = 0; controlsBackground[] = { }; objects[] = { Radio3DObject }; controls[] = { }; class Radio3DObject { idc = -1; type = 82; model = "\A3\ui_f\objects\radio.p3d"; scale = 1; direction[] = {0, 1, 0}; up[] = {1, 0, -1}; position[] = {0, -0.043, 0.25}; positionBack[] = {0, 0, 0.625}; inBack = 1; enableZoom = 1; zoomDuration = 0.5; class Areas { class ThisClassCanBeNamedWhatever { selection = "papir"; class Controls { class EditBoxMultiLine { idc = 1; type = 2; style = 16; x = 0; y = 0; w = 1; h = 1.9; colorText[] = { 0 ,0 ,0 , 1 }; colorSelection[] = { 1, 1, 1, 1 }; colorDisabled[] = { 0, 0, 0, 0 }; sizeEx = 0.2; font = "PuristaMedium"; text = ""; autocomplete = ""; }; }; }; }; }; }; Just run it with this from your script: createDialog "Radio3DTestDialog"; And you should get this to play with: http://skipgo.net/arma3/hvm/dialog3d.jpg (471 kB) Happy editing! -
3D objects in dialogs
Einherj replied to das attorney's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thanks guys, I had troubles getting the models to show on ArmA 3, even though I've done this in previous ArmA titles. This helped me to get it working! I have a new problem, though: I can't get the dialogs to display on the models' surfaces like it was done in the previous ArmA games (radio & GPS). I made a new thread about that here: http://forums.bistudio.com/showthread.php?177813-Dialog-controls-on-3D-object-surface Let me know if you have a solution. And thanks again! -
I had the same problem and removing the dsound.dll from the Arma 2 directory fixed it for me too. Thank you!
-
Infection 0.2 Alpha By: Einherj Requirements: - ArmA 2 and Operation Arrowhead expansion or ArmA 2: Combined Operations - Patch 1.60 recommended Install instructions: 1. unpack the contents of the file EHJ_Infection_0_2_alpha to your ArmA 2 OA directory (overwrite old versions if prompted) 2. run ArmA 2 OA / CO with -mod=@EHJ_INF parameter or use a launcher Features: - Slow-moving zombie-type infected variations of all game units on the OPFOR side - infected units roam aimlessly until they spot an uninfected unit - the infected follow and attack all uninfected units - the infected have two attacks: a slower more powerful charge and a faster standing maul - MP compatible Limitations: - OPFOR units controlled by AI do not shoot the infected since they are on the same side - No female infected Usage: 1. Place the "EHJ Infection: Core" module in the editor 2. Place any number of infected units in the editor or create them dynamically 3. ??? 4. Profit. Classnames: - All infected units have their uninfected counterpart's classname preceded with "EHJ_INF_" Examples: "USMC_SoldierS_Engineer" --> "EHJ_INF_USMC_SoldierS_Engineer" "Ins_Commander" --> "EHJ_INF_Ins_Commander" - All infected units have their uninfected counterpart's faction classname preceded with "EHJ_INF_" Examples: "USMC" --> "EHJ_INF_USMC" "INS" --> "EHJ_INF_INS" Variables: [table=width: 1200, align: left] [tr] [td]- EHJ_INF_CORE_LOGIC references to the "EHJ Infection: Core" module placed in the editor and it has the following variables in its namespace:[/td] [/tr] [tr] [td][/td] [/tr] [tr] [td]Non-modifiable (can be acquired with getVariable)[/td] [/tr] [tr] [td]Variable name[/td] [td]Description[/td] [/tr] [tr] [td]EHJ_INF_INITIALIZED[/td] [td]TRUE when the Infection has been initialized[/td] [/tr] [tr] [td]EHJ_INF_UNITS_ALIVE[/td] [td]Contains an array of all the alive infected units[/td] [/tr] [tr] [td]EHJ_INF_UNITS_DEAD[/td] [td]Contains an array of all the dead infected units[/td] [/tr] [tr] [td][/td] [/tr] [tr] [td][/td] [/tr] [tr] [td]- Every infected unit has the following variables in its namespace:[/td] [/tr] [tr] [td][/td] [/tr] [tr] [td]non-modifiable (can be acquired with getVariable)[/td] [/tr] [tr] [td]Variable name[/td] [td]Description[/td] [/tr] [tr] [td]EHJ_INF_INITIALIZED[/td] [td]TRUE when the infected unit has been initialized[/td] [/tr] [tr] [td]EHJ_INF_TARGET_OBJECT[/td] [td]The currently targeted uninfected unit (objNull if none)[/td] [/tr] [tr] [td]EHJ_INF_TARGET_POSITION[/td] [td]Position the infected unit is currently moving to ([0,0,0] if none)[/td] [/tr] [tr] [td][/td] [/tr] [tr] [td]modifiable (can be acquired with getVariable and modified with setVariable)[/td] [/tr] [tr] [td]Variable name[/td] [td]Description[/td] [/tr] [tr] [td]EHJ_INF_TARGET_SEARCH_DISTANCE[/td] [td]The maximum distance from which the infected unit can detect targets (default: 300)[/td] [/tr] [tr] [td]EHJ_INF_HOME_OBJECT[/td] [td]An object which the unit will not wander away from (default: the unit itself)[/td] [/tr] [tr] [td]EHJ_INF_HOME_POSITION[/td] [td]A position which the unit will not wander away from (relative to home object unless it is objNull. Default: [0,0,0])[/td] [/tr] [tr] [td]EHJ_INF_HOME_DISTANCE[/td] [td]How many meters from the home object / position the infected unit can wander away from (minimum of 5m. Default: 30)[/td] [/tr] [tr] [td]EHJ_INF_SPEED_MODE[/td] [td]Determines how fast the infected unit moves around ("SLOW" / "FAST". Default: "SLOW")[/td] [/tr] [/table] Functions: STRING call EHJ_INF_SET_DIFFICULTY (STRING = "EASY" / "MEDIUM" / "HARD"). Sets the difficulty of the infected (only affects the damage they deal so far) Changelog: [table=width: 700, align: left] [tr] [td]Type[/td] [td]Description[/td] [/tr] [tr] [td]Fixed[/td] [td]The infected slow down indoors[/td] [/tr] [tr] [td]Improved[/td] [td]Optimized the infected AI[/td] [/tr] [tr] [td]Added[/td] [td]The infected crawl if their legs are badly damaged[/td] [/tr] [tr] [td]Added[/td] [td]Infected unit variable: EHJ_INF_INITIALIZED[/td] [/tr] [tr] [td]Added[/td] [td]Infected unit variable: EHJ_INF_TARGET_SEARCH_DISTANCE[/td] [/tr] [tr] [td]Added[/td] [td]Infected unit variable: EHJ_INF_TARGET_OBJECT[/td] [/tr] [tr] [td]Added[/td] [td]Infected unit variable: EHJ_INF_TARGET_POSITION[/td] [/tr] [tr] [td]Added[/td] [td]Infected unit variable:EHJ_INF_HOME_OBJECT[/td] [/tr] [tr] [td]Added[/td] [td]Infected unit variable: EHJ_INF_HOME_POSITION[/td] [/tr] [tr] [td]Added[/td] [td]Infected unit variable: EHJ_INF_HOME_DISTANCE[/td] [/tr] [tr] [td]Added[/td] [td]Infected unit variable: EHJ_INF_SPEED_MODE[/td] [/tr] [/table] Known Issues: [table=width: 700, align: left] [tr] [td]Issue[/td] [td]Status[/td] [/tr] [tr] [td]- Hit animation freezes sometimes[/td] [td]Finding a solution[/td] [/tr] [tr] [td]- The infected behave weird sometimes when grouped together[/td] [td]Solution found. Fixing[/td] [/tr] [tr] [td]- Factions are not in order in the editor[/td] [td]Finding a solution[/td] [/tr] [/table] Future features: [table=width: 1200, align: left] [tr] [td]Feature[/td] [td]Planned for[/td] [td]Status[/td] [/tr] [tr] [td]- Infected groups * Groups of mixed infected units to make mission makers' job easier [/td] [td]0.3 alpha[/td] [td]Under development[/td] [/tr] [tr] [td]- Infected vehicle AI * Infected interaction towards vehicles occupied by uninfected units [/td] [td]0.3 alpha[/td] [td]Under development[/td] [/tr] [tr] [td]- 'Breakout' coop mission * 10 player dynamic survival coop mission [/td] [td]the future[/td] [td]Under development[/td] [/tr] [tr] [td]- Infected sounds * Custom growling and roaring sounds for the infected [/td] [td]the future[/td] [td]Under development[/td] [/tr] [/table] Thanks: - teaCup for the animations Download: Infection 0.2 Alpha (current version): Armaholic Mediafire Infection 0.1 Alpha: Mediafire
-
Infection (light zombie addon)
Einherj replied to Einherj's topic in ARMA 2 & OA - ADDONS & MODS: COMPLETE
I apologize for the halt in the development of this addon. I simply do not have time to continue to work on it in the near future since I am swamped in other projects for now, but I hope I can revisit it at some point. I just wanted to let all you active thread checkers know not to expect much of a change for a while. :( -
Infection (light zombie addon)
Einherj replied to Einherj's topic in ARMA 2 & OA - ADDONS & MODS: COMPLETE
I'm afraid I haven't had a lot of time to dedicate to this addon in a while but I'll be coming back to it soon enough. I can't give you any time estimates though, sorry. -
Infection (light zombie addon)
Einherj replied to Einherj's topic in ARMA 2 & OA - ADDONS & MODS: COMPLETE
The infected actually do attack all sides already even though they are EAST themselves. For the infected AI to work correctly the infected side has to be friendly to the other sides. This prevents the built in engine danger behavior kicking in and messing with pathfinding and animations. The problem is that EAST units don't attack any other sides since they are friendly to everyone. At first I added the infected to the CIVILIAN side since they are friendly to everyone already but if you set the other sides enemies to the CIVILIANS the AI units seem to fire at random buildings and some such since those are considered civilian too. I have not checked if this has changed in the latest patch though. I'll explore on that. This is why I was thinking of adding infected units to all sides and letting mission makers decide which side they want to use in that specific mission. They could only use one infected side per mission though. -
Infection (light zombie addon)
Einherj replied to Einherj's topic in ARMA 2 & OA - ADDONS & MODS: COMPLETE
You can not declare a new side in the configs so that is impossible. What I meant to say in the last post was that there will be infected units on every side (not faction), so you can choose which one you use for your missions. :) -
Infection (light zombie addon)
Einherj replied to Einherj's topic in ARMA 2 & OA - ADDONS & MODS: COMPLETE
I don't even remember why I did it back then. My future intention is to add infected units to every faction. Would this be satisfactory? :D -
Infection (light zombie addon)
Einherj replied to Einherj's topic in ARMA 2 & OA - ADDONS & MODS: COMPLETE
Sounds really weird and off the top of my head I can not think of anything that could cause that. I would really appreciate if you could send me the mission via email (31nh3rj(at)gmail.com) and I could take a look at it. Infection does not include any graphical content yet, just the converted units, their AI and one special infected walking animation. I'll concentrate on creating a good base behavior for the infected units before I move on to the audiovisual content. -
Infection (light zombie addon)
Einherj replied to Einherj's topic in ARMA 2 & OA - ADDONS & MODS: COMPLETE
Thank you, Foxhound. -
Infection (light zombie addon)
Einherj replied to Einherj's topic in ARMA 2 & OA - ADDONS & MODS: COMPLETE
Released 0.2 Alpha. Let me know if you find bugs or other anomalies :) -
Infection (light zombie addon)
Einherj replied to Einherj's topic in ARMA 2 & OA - ADDONS & MODS: COMPLETE
That will not be a problem, I'll add it to the list. :) -
Infection (light zombie addon)
Einherj replied to Einherj's topic in ARMA 2 & OA - ADDONS & MODS: COMPLETE
I am quite sure you can not define new cfgVehicles & cfgMoves etc. classes in a mission since description.ext is parsed into the mission root instead of the main config root where all the config files from addons are parsed into on startup. I would have made this addon-free if it was possible. :) -
Infection (light zombie addon)
Einherj replied to Einherj's topic in ARMA 2 & OA - ADDONS & MODS: COMPLETE
Thank you for all the new replies, folks :) My main focus now is to provide easy to use infected units that people can add into their missions. I am still concentrating on core things like AI and usability. I do intent to add features along the way and one of them is going to be optional infection spreading. The infected attacking vehicles is coming shortly. Animations are a tricky thing in ArmA 2 and I am not an animator nor a graphics / sound artist. All of those three things require immense amount of work with minimal to no gain without a proper code base. So, as of now I will concentrate on the game mechanics. The one custom animation in the addon (walking with hands in front) is an old ArmA animation by teaCup converted to ArmA 2. I do however have a couple of features in mind which would look a lot better with just a couple of new animations so if there are ArmA 2 animators here, please contact me and let's make this addon a bit prettier :) - I am not currently planning on doing any maps, you can use maps other people have made, no problem - No new skins or models coming either. Other people are greatly more gifted in those things so I will dedicate my time on what I am good at: scripting - This can be done - This is already possible, you can make groups out of the infected. I haven't made any spawners yet though so you just have to script your own :) I was actually planning on doing this. Probably for 0.3. -
Infection (light zombie addon)
Einherj replied to Einherj's topic in ARMA 2 & OA - ADDONS & MODS: COMPLETE
Thank you for the report, I'll look into it.