Jump to content

fiftysnens

Member
  • Posts

    8
  • Joined

  • Last visited

Recent Profile Visitors

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

fiftysnens's Achievements

Rookie

Rookie (2/15)

  • One Month Later
  • Week One Done
  • First Post
  • Conversation Starter

Recent Badges

1

Reputation

  1. fiftysnens

    Collision Detection

    Hi, iam still not getting the hang of it. I understand if you dont have the time, but i assume u are the best person to ask. Iam getting this error message: Failed to call hook 'OnEntityTakeDamage' on plugin 'Biplane v1.0.2' (NullReferenceException: Object reference not set to an instance of an object) at Oxide.Plugins.Biplane.OnEntityTakeDamage (BaseEntity entity, HitInfo info, UnityEngine.Rigidbody rigidbody, ModularCar modularCar) [0x00014] in <4c56633b7e3a49d69e6a187890c517f7>:0 at Oxide.Plugins.Biplane.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00192] in <4c56633b7e3a49d69e6a187890c517f7>:0 at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <60c318df79ed41688ea59335e48d61ad>:0 at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <50629aa0e75d4126b345d8d9d64da28d>:0 at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <50629aa0e75d4126b345d8d9d64da28d>:0 the code refferanced would be: object OnEntityTakeDamage(BaseEntity entity, HitInfo info, Rigidbody rigidbody, ModularCar modularCar) { rigidbody = modularCar.rigidBody; float speed = rigidbody.velocity.magnitude; if (entity == null || info == null) return null; if ((entity.ShortPrefabName.Contains("kayak")&&(speed <=14)) || (entity.ShortPrefabName.Contains("boogieboard")&&(speed <=14)) || (entity.ShortPrefabName.Contains("engine")&&(speed <=14))) { BiplaneComponent biplaneComponent = biplanes.FirstOrDefault(x => x.subEntities.Contains(entity)); if (biplaneComponent == null) return null; biplaneComponent.modularCar.Hurt(info); NextTick(() => { var damagetaken = info.damageTypes.Total(); if (damagetaken >= 15) { Effect.server.Run("assets/content/vehicles/minicopter/debris_effect.prefab", entity.transform.position); var fireball = GameManager.server.CreateEntity("assets/bundled/prefabs/fireball.prefab", entity.transform.position); if (fireball == null) return; fireball.Spawn(); biplaneComponent.modularCar.Kill(); } }); return true; } else if ((entity.ShortPrefabName.Contains("kayak")&&(speed >=15)) || (entity.ShortPrefabName.Contains("boogieboard")&&(speed >=15)) || (entity.ShortPrefabName.Contains("engine")&&(> { return null; } return null; }
  2. fiftysnens

    Collision Detection

    I do not own the usage right, but i will message you in discord. thanks up front
  3. fiftysnens

    Collision Detection

    Hi, iam currently editing the Biplane plugin to my needs and i encountered a point where i dont know how to proceed. I tryed to add damage detection for when the plane collides with terrain by using Hitinfo but iam not mistaken by my privous attempts, damage dealt by anything that is not a player / projectile is not handled via Hitinfo ? If thats the case is theer any other way of detecting the collision ? I thought about checking the prefabs velocity for a sudden drop of more then ~15, but can not figure out a way to compare it to 1 or 2 frames before as the only thing i know that comes close to this would be NextTick but i doubt it can be used here. Thanks for any advise or Ideas you might have ! If you would like to see what i did so far, i have asked the same question on umod with a code example (dont worry i did not publish your work) https://umod.org/community/rust/41441-detect-plane-collison?page=1#post-2
  4. fiftysnens

    Images dont show up

    AAAnd its solved. Thanks
  5. fiftysnens

    Images dont show up

    No. I guess thats the problem ?^^
  6. fiftysnens

    Images dont show up

    Hi, very nice Idea, i bought it to test it and play around with, but after installing and troubleshooting for 3 hours, i still cant get it quite to work ... for the whole time, wether the icons were saved localy, with imgur or on a otherwise unused webserver, the pictures dont show up when looking at the prefabs ingame
1.1m

Downloads

Total number of downloads.

5.7k

Customers

Total customers served.

82.1k

Files Sold

Total number of files sold.

1.6m

Payments Processed

Total payments processed.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.