Skip to content
View in the app

A better way to browse. Learn more.

LCPDFR.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Need a better method to pop them tires!

Featured Replies

Hey guys... so I decided today to stop playing with Unity so much, and start toying with LCPDFR again!  ...

 

No... I've never made anything, but I want to!  This is not a thread asking about how to learn to code in C#, I've got that figured out (some what...) - I do however, after my first few hours of toying have a few questions that I cannot really solve on my own.

 

 

First...

I'm confused on the work order of things, I'm not sure how my codes being hit up.  I've been using VS 2012 and 4.5 with the script hook to get started, and I've for the most part been using Game.DisplayText to debug... which - is very bad, because so far I can only get it to display once (the first time its called, and it never again appears... which is not so good for checking my Vector3s....)

 

I'm not using any Ticks, because well, any time I've attempted to use this.Tick += new EventHandler (blahblah);

I get pointed in another direction, it leads me to believe that its been updated and I'm using old learning sources?

 

So my main body, it keeps running, over and over correct?  Why does the message of Game.DisplayText not keep displaying, or updating?

 

Ok enough of my random Q's.  I'll tell you where I'm at...

 

I'm trying to make a spike strip mod.  Currently I'm using a place holder (wooden planks) for the mod, I've got the guy doing his animation to throw down the "wooden spike strips", the spike strips however only pop the tires of the nearest car if its within 3.0f.  Any additional cars that run it over, will not have pop'd tires.

 

I'm confused because I've got it so I grab all the near vehicles, stack them into a array, check the distance to the strip, and pop if it can, the main problem is... it seems to only do this once, if the vehicles are within when its being placed...  Every few seconds or so I check to see if there is another close vehicle, recheck the vectors of those vehicles and go for the pop but the magics not happening...

 

 

Not sure if you guys want to see code right away... or not.

 

I was trying to find some native methods of using collision or trigger detecting rather then grabbing the vector3s from alllll the cars in the area... but because I couldnt, I went with a more costly method...

 

Lemme know if you guys wanna see code.

 

logov1_zpsd8d8fbe3.jpeg

Help my channel grow and I can explain to my wife why this addiction to coding is a good thing!

  • Author

Does anyone know if there is a way to script a collision detection to the object, rather then getting the distance of all vehicles in the area - because I think thats most costly...

 

I tried using .Collision to very little success, I have a feeling thats for collisions of a different nature.

 

Lastly my most important question is why for the love of god is the code hitting into that if statement for the F1 keypress, if I know its changing over to true in the checkdispop method?  I've confirmed its toggle'd correctly with Game.DisplayText

 

Ok so I found out I cannot seem to toggle the bool in the main thread - only in the methods... even if I used a if elseif it would hit all...

 

I'll update this code later - because it barely looks like posted product right now.  Not at home.

 

I'll update as I go along guys.

Edited by FinKone

logov1_zpsd8d8fbe3.jpeg

Help my channel grow and I can explain to my wife why this addiction to coding is a good thing!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.