Page 3 of 4 FirstFirst 1234 LastLast
Results 21 to 30 of 32

Thread: Gentleman, allow me to introduce you to my MOM

  1. #21

    Default

    Quote Originally Posted by DoubleKill View Post
    ...model like steilhandgranate...
    Every time I read that word it bugs me a little because The Granade is not steil (steeply) it is attached to a Stiel (handle)
    It is the same with "Eigenschaft der deutschen Wehrmacht" it is suppose to be "Eigentum der deutschen Wehrmacht"
    They probably translated "Property of the German Wehrmacht" but property can be translated for both words but they have a completely different meaning in German...
    Eigenschaft (characteristics)
    Eigentum (possession)
    I just wanted to get that off my chest, this has ben bugging me from day 1 in this game.

    Quote Originally Posted by DoubleKill View Post
    I give you the script for reborn...
    Thanks, I'll try that out

  2. #22

    Default

    Okay, I have added your Reborn scripts, I made some modifications to them.
    I also guess it should now be compatible to aa, bt and sh as well.

    I also changed the precision with which the scripts are assuming which player belongs to which weapon and vice versa.
    The weapon the player was using before will also be restored once he exits the menu.

    There are problems with the weapons, I didn't have the motivation to look into it right away (error messages in comnsole).
    I had very little time so far to work on the stuff, but plenty of interruptions, so there will be a update again, once I have the time for it.

    I think this is the best operational version this far now for mohaa.
    Last edited by chrissstrahl; September 1st, 2018 at 03:50 PM.

  3. #23

    Default

    Theres on problem on the mod, the command getentbyentnum dont exist on the game.

    If you whant to get the player entity number you have to use local.player.entnum.

    If is not the player entnum and you whant to get the model of the weapon you have to use the same way i was doing to get the weapon by targetname.

  4. #24

    Default

    Quote Originally Posted by DoubleKill View Post
    Theres on problem on the mod, the command getentbyentnum dont exist on the game[/B].
    IT works in BT. in which game does it not work ?
    I rather detect the game and use alternative means for the game it does not work.

    I also don't understand why someone would remove a command like that

  5. #25

    Default

    Dont work on AA and SH.

    Another problem i have find is the when we change the part to use the command getposition the only way to get the menu to use is pressing the key and crouching.

    And makes another problems like for example im going to plant the bomb on the canon and when i crounch and press use the menu is going to pop on the front me instead of watching the bomb.

    Is better to give the menu when the player spawns that way he will have the menu ready to use but he need to bind a key to the menu to use him like this:

    Code:
    bind x pushmenu mom
    Last edited by DoubleKill; August 12th, 2018 at 04:36 AM.

  6. #26

    Default

    BT was the last game, so it's just new commands added to the engine for that version.

  7. #27

    Default

    Quote Originally Posted by DoubleKill View Post
    Dont work on AA and SH.
    Fixed now, HOPEFULLY... I really hope this is now finally compatible :-/
    VERSION 2.3
    - Changed setup to allow changing of parameters during the game
    - Added momExit function into mom_action.scr as example how to force a exit
    - Added a default exit routine that is always executed if mom is ended for a player
    - Added the ability to disable mom by pressing use, allowing to rather start it from a trigger
    - Added type conversion of parameters in the setup function
    - Fixed momWatchdog function not preventing multiple calls
    - Fixed menu name being static, when it should be dynamic and changeable via setup parameters
    - Fixed console errors created by the mom weapons
    - Fixed incompatibility with getentbyentnum (reported by DoubleKill)
    - Disabled unused functions: isWeaponModel, getCurrentWeapon
    - Removed safeholster command upon menu exit
    - Removed some useless commentaries
    - Removed redundant code
    Quote Originally Posted by DoubleKill View Post
    ..im going to plant the bomb on the canon and when i crounch and press use the menu is going to pop on the front me instead of...
    Sorry but some how it has to be done.
    I figured pressing more than 2 sec the use-key is unusual behaviour for a regular player that is why I did it this way.

    Quote Originally Posted by DoubleKill View Post
    Is better to give the menu when the player spawns...
    I can not agree here, because the weapons will be in the inventory and a player will activate functions while scrolling the inventory.
    I am also against the idea that a player can at any time use any command of a menu like this even if he is not in the menu.
    This could be keybinded to be abused

    Quote Originally Posted by 1337Smithy View Post
    BT was the last game, so it's just new commands added to the engine for that version.
    Ow, I thought SH was the last, well, I guess I should have looked it up
    Attached Files Attached Files

  8. #28

    Default

    Cool, looking good, chrissstrahl .

    I know this isn't really a problem, especially for what you're doing, and I know I do it in my code too if I don't notice it, but if you are dead set on getting the name of the weapon via your momName function (I won't say a word ), you're unnecessarily calling it twice by first evaluating it in the if condition, then calling it again by storing the thread name (obviously only if you hit the else, but that will happen often). I'm a weirdo who likes trying to find little optimisations, that to be fair could be big optimisations if you were to do the same thing but with larger functions.

    So you can go:


    local.mom_name = self waitthread momName
    if(local.mom_name == "mom"){
    local.player thread exit
    }
    //every other weapons model used will be handled here
    else{
    local.player exec (level.mom_actionScript)::main local.mom_name
    local.player holster
    }


    Again, if you were to look at any of my code, I'm sure you'd find me doing the same thing at times, but it's sometimes easier for outside parties to notice this stuff as they aren't focused on the more important stuff (namely, getting entire mods done when you've already got lots on your plate).
    Last edited by 1337Smithy; August 12th, 2018 at 10:12 AM.

  9. #29

    Default

    Quote Originally Posted by 1337Smithy View Post
    Cool, looking good, chrissstrahl .
    Thanks, but I hope it also works

    Quote Originally Posted by 1337Smithy View Post
    ...you're unnecessarily calling it twice by first evaluating it in the if condition...
    Well, yes, putting it in a var would have been the more efficient way, most of the time.

    Well, MOM is a kind of core script where other scripts can be based on, they rely on the script working perfectly.
    So in this case it is very important that all of the script works well, is efficient and sets a good example.

    Same goes for the coop mod, if the core functions suck, the entire mod will suck. But if they are top, there is a solid
    basis to make the level scripts work well, which will then make a excellent coop mod.

  10. #30

    Default

    I will test it for sure when I have time later .

    Yeah, I know what you mean. Your code is neater than mine to be fair. I can be quite lazy at times when designing my SP maps. I shock myself sometimes actually haha.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •