Jump to content

Einherj

Member
  • Content Count

    28
  • Joined

  • Last visited

  • Medals

Community Reputation

10 Good

About Einherj

  • Rank
    Private First Class

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. 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"); } };
  2. 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
  3. 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.
  4. 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
  5. That might be it. That's how it's done in the BIS models.
  6. 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.
  7. 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.
  8. 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.
  9. 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!
  10. Einherj

    3D objects in dialogs

    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!
  11. 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.
  12. I had the same problem and removing the dsound.dll from the Arma 2 directory fixed it for me too. Thank you!
  13. 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. :(
  14. 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.
  15. 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.
×