ajs52698 Posted September 5, 2016 Share Posted September 5, 2016 Once again ive been messing around with scripting and im again, having a hard time understanding how to do something. In this case its checking whether the current location of the player has been cleared. This is what ive got, dont know if its right or not. Also would be nice if someone could explain things like int and strings and whatever else, its one thing im still confused about. Event OnCellLoad() Strings MyLocation == Game.getplayer().GetcurrentLocation() if MyLocation.iscleared() Endif EndEvent Link to comment Share on other sites More sharing options...
StuykGaming Posted September 5, 2016 Share Posted September 5, 2016 Hey ajs, been kinda following you do a bit. Anyway hopefully I can lend a hand. You're pretty close but when you call things like a Location. That's actually something you need to call it as. So when you're poking around the Wiki, the hyphened off things are literally what you would call it as, or rather what it applies to. http://i.imgur.com/1YJK6c9.png Actor, ActorBase, Location, FormList, ObjectReference, Potion, etc. What you want to do is instead of cast for a 'Strings' You want to cast it as a Location. <CAST AS> <VARIABLE> = <WHAT YOU WANT TO GET> <POSSIBLY CONVERT> Honesty check out this 'Cast As' page. http://www.creationkit.com/fallout4/index.php?title=Cast_Reference STRING are literally words. It's like using Debug.Notification("THIS IS A STRING") INT is an Integer, they have to be whole numbers. 0, 1, 2, 3, 4, etc. FLOAT is an Integer with Decimals. They store exact number values. 0.21, 1.53251, etc. BOOL is a true or false statement. It can only be true or false, no matter what. Here are the function literals. http://www.creationkit.com/fallout4/index.php?title=Literals_Reference Hope this can clear some things up for you. Link to comment Share on other sites More sharing options...
ajs52698 Posted September 5, 2016 Author Share Posted September 5, 2016 (edited) Alright thanks for this information, it will be extremely helpful! Edited September 5, 2016 by ajs52698 Link to comment Share on other sites More sharing options...
TummaSuklaa Posted September 5, 2016 Share Posted September 5, 2016 (edited) Change the string variable type to Location. Location MyLocationBut it's not necessary unless you're calling GetCurrentLocation more than once. For all Get functions, if you need to call them more than once, and if you know the value you are looking for isn't going to change, you want to store their result to a variable and use it throughout the script. Edited September 5, 2016 by TummaSuklaa Link to comment Share on other sites More sharing options...
ajs52698 Posted September 7, 2016 Author Share Posted September 7, 2016 (edited) Alright nvm I think ive got it thanks for earlier help again. Edited September 8, 2016 by ajs52698 Link to comment Share on other sites More sharing options...
Recommended Posts