Jump to content

Maffine

Member
  • Content Count

    15
  • Joined

  • Last visited

  • Medals

Everything posted by Maffine

  1. Hello guys, I have made a code generally like: Extended_Init_EventHandler { class CAManBase { init = "if (_this select 0 == player) then { /*code*/ }"; } } And now I want to run on multiplayer games. Suppose I am hosting a game with the code and my friend joined my game without this code. Question is, will the { /*code*/ } be triggered when my friend enter the game and initialize himself? Many thanks to your help
  2. Well never mind, the code is troublesome and I've decided to do it the easier way. Thanks anyway.
  3. Emmm, an addon I loaded on my own computer? Maybe I am misunderstanding multiplayer scripting XD
  4. Hello guys, I'm working on a script and need to identify the object info of the player's weapon (that in the format 11111: dummyweapon.p3d). I have already tried using lineIntersectsSurface but it does not respond to human units. I also tried using cursorObject for Biki says it will return the p3d info when pointing at other units' weapons, but no result so far. I remember that there is a line of command that can return that info of player's backpack and vest (backpackContainer and so), but no counterpart for other proxy. So I am currently out of options. Does anyone know whether the weapon's object info can ever be retrieved by someone other than the engine itself? Thanks
  5. Well, I want to assign a handle to the weapon player is holding. Is it possible that way?
  6. The tricky part is that I need to get an object as a return, not a string or array or so.
  7. Thanks gc8😄Sorry that maybe I'm not expressing myself very precisely, what I want to do is to get the instance instead of the class, or put it another way, the piece of code that represents "the" exact gun held by player like for example a chair spawn in a mission, instead of the class name telling all the attributes about the gun. Hope I am anywhere close to saying something meaningful, for I am really not good at describing something so nuanced. Thanks again for your help!
  8. Mf's Heal Abort Steam Workshop: https://steamcommunity.com/sharedfiles/filedetails/?id=1911813061 Download: https://drive.google.com/open?id=1fFjdBu9bp6SfguAVGtfXNPAK_v9n7XwL Description: This mod allows you to abort your action when healing yourself using first aid kit/medikit, so that you can promptly deal with it when a sudden situation emerges (like enemies jump out and shoot at you). Noted that when you abort the healing action using first aid kits, the kit you are using will be lost instead of being recovered, so do it thoroughly (i.e. when there is really a necessity). Also do keep in mind that heal abort is not available for the healing action on others. Should be (not tested yet) compatible with multiplayer. How to use this mod: When healing, press primary weapon key (default "1") or secondary weapon key (default "2") to abort healing and draw your weapon. Future plans: While it is to me that the key mapping is explicit and appropriate enough for any alternative key binding options, if there is really such a demand, I will consider adding CBA key bindings. License: Please don't reupload this mod. On the other hand, please feel free to use any segments of my code to construct yours. Contact me: If you want to report a but, or have anything that you would like to let me know, please don't hesitate to contact me. Support me: Any support will be greately appreciated. Donate me if you enjoy this mod and feel that it worths one or two dollars. paypal.me/mfhealAbort
  9. Maffine

    Mf's Heal Abort Mod

    Working on it man😉I've already found a way to cancel reload, but it will always end up with the mag that is to be equipped lost. Now I've think of a way or two that can make it possible to get pass it but they are all very tricky and have to take some real testing to get it work.
  10. Maffine

    Mf's Heal Abort Mod

    You read exactly my mind😆I am working on it now, and also a speed reload extension, though I'm kind of stuck here getting over the animation part...
  11. Maffine

    Mf's Heal Abort Mod

    Oh I see, looks like it is another example of Bohemia's poor naming strategy😂For I always confuse the movement of players with the action menu. Both the two are frequently called "actions" While I am not an expert on actions and dialogs, I would try to do some diggings and see if I can put it together. What I am not sure is, how am I going to manage it given that I have two selectable actions at the same time. Probably make it into an interactive menu? And do you think I should make the default action key (default "space") available for one of those heal aborting actions as well as the weapon switch keys? Anyway, thanks very much for your advise! I've never thought about this and it is truly inspiring.
  12. Maffine

    Mf's Heal Abort Mod

    Thanks oldy41, I'm really happy that you like it! 🙂 As for the breaking animation, at first glance I am afraid there is less thing I can do AFAIK (if you are talking about a very smooth transition), but just to make sure, after I finish my work I will go check how the ladder climbing works (never noticed before lol) and see if I can grasp your idea. If I failed, I will have to bother you describing how this action you mentioned is like. And again, many thanks that you like my work!
  13. Hello everyone, I am currently doing two addons for myself and I encountered some problem in field test after everything made sense in editor. The mission I used to test involves a virtual arsenal at some point of the mission so that the player can customize their loadouts. However it would just stuck at the loading screen when I try to open the arsenal with the script on. I tried to run the mission without any mods and everything works fine, and when I only enable one script, the arsenal became accessible only that it will take much longer. Therefore my theory is that the while do script runs on each frame even when the loading screen is displayed and somehow severely affect the efficiency of the loading process. The problem is whether this can be avoided. The code structure I used for both addons: [] spawn { _varA = 0.0; _varB = 0.0; ... while {alive player} do { <Some code here> }; }; I understand that there may be a performance issue since my PC is really an old one, but it is obviously more ideal if the addon is more friendly to low-end devices. Thanks for any advice and sorry for my poor English.
  14. Nah, it's an addon. I ran it through my own sqf file defined in my config.cpp
  15. OK...I found another running script with do while loop that is forgotten by me. After changing all the while {alive player} to while {true} and optimizing some of my code, the arsenal is available now. Sure it still takes longer than normal (with no mod loaded), but it does not take infinite anymore.
×