UFC Tower Defense

● ARCHIVED · READ-ONLY
Started by UnwantedFriedChicken 65 posts Page 4 of 4 View original ↗
  1. This is a great plugin that enables developers to make a tower defense game with RPGmaker MZ. Nevertheless, I have encountered some errors when I try to incorporate the plugin into my game. Below is my sharing on how to fix the errors which I have encountered.

    UFCTowerDefence.js:

    1748093984526.png

    For the UFCTowerDefence.js plugin, there is an extra "//FS" on line 5548, which causes an error when using with the Visustella Message Core

    UFCTextHelper.js:

    1748094353310.png


    For the UFCTextHelper.js plugin, the function "Text_UFCTextHelper.prototype.destroy" will report an error: "Sprite.prototype.destroy.call is not a function ". To fix this, you may change the function like the following:

    1748094655541.png

    It would be great to update the plugin if the development is not discontinued. I highly appreciate the endeavors and the creativity of the authors who made this plugin. Happy game making!
  2. thank you
  3. Does anyone have this working with core script 1.9.0? I get event.event type errors whenever I try to lay down a tower... Any ideas?

    Edit: actually, it's not just with 1.9.0, as when I update the demo core script it works fine, but when I try and incorporate this into my own game (instead of use int he demo), I get an error whenever I try to place a tower. "TypeError event.event is not a function"

    Edit 2: I discovered the culprit, UFC Tower Defense does NOT play nice with Community Lightning for MZ...
    (even if no lights are being used on the map in question). Whenever I go to set a tower down, I get the following TypeError: "events.event is not a function." The Following code from Community Lightning appears to maybe be the culprit?

    Code:
        //**********************fill up new map-array *************************
        eventObjId = [];
        event_id = [];
        events = $gameMap.events(); // cache because events() API calls filter for each call
        event_stacknumber = [];
        event_eventcount = events.length;
    
        if (GameLoaded) $$.ReconstructTypes($gameVariables, true); // on game loaded, we need to reconstruct the stored types
    
        for (let i = 0; i < event_eventcount; i++) {
          if (events[i]) {
            if (events[i].event() && !events[i]._erased) {
              let note = events[i].getCLTag();
    
              let note_args = note.split(" ");
              let note_command = LightType[note_args.shift().toLowerCase()];
              if (note_command) {
                eventObjId.push(i);
                event_id.push(events[i]._eventId);
                event_stacknumber.push(i);
    
              }
            }
    
            // on game loaded, restore light event data
            if (GameLoaded && $gameVariables._cl && $gameVariables._cl[events[i]._eventId]) {
              events[i]._cl = $gameVariables._cl[events[i]._eventId];
            }
          }
        }
        
        // Mark game as not loaded
        GameLoaded = false;

    Something to keep in mind for anyone planning to use both.
  4. Does anyone get errors when using the barricade style items?
  5. Anyone know what might be causing the following error during play?


    TypeError: Cannot read property 'startAnimation' of undefined
    at Game_Temp.requestAnimation (rmmz_objects.js:113)
    at Function.TowerDefenseManager.requestAnimation (UFCTowerDefense.js:3754)
    at Game_TDEnemy.attackTrigger (UFCTowerDefense.js:1744)
    at Game_TDEnemy.triggerDestroy (UFCTowerDefense.js:1734)
    at Game_TDEnemy.update (UFCTowerDefense.js:1549)
    at Game_Map.updateTowerDefenseEnemy (UFCTowerDefense.js:3437)
    at Game_Map.update (UFCTowerDefense.js:3408)
    at Scene_Map.updateMain (rmmz_scenes.js:842)
    at Scene_Map._.updateMain (PKD_MapEquipWindow.js:9405)
    at Scene_Map.updateMain (FilterControllerMz.js:1900)