Jump to content

Search the Community

Showing results for tags 'script'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Blogs

  • Development Blog
  • Canardian's Blog
  • Beyond Civilization Blog Ext
  • Tyler's Blog
  • macklebee's Blog
  • B-Byrnes' Blog
  • Marleys Ghost's Blog
  • omid3098's Blog
  • Richardsimpo123456's Blog
  • DJDD's Blog
  • Rick's Blog
  • --
  • xtreampb's Blog
  • Economically Disadvantaged
  • klepto2's Blog
  • Old Blog
  • Chris Paulson's Blog
  • Davaris' Blog
  • nil
  • Rekindled Phoenix's Blog
  • Flexman's Blog
  • Kattemaksu Online
  • Marcousik's Creations Blog
  • EVE LBS Studio
  • Rendering puzzles
  • Screen Size Utility
  • Niosop's Blog
  • 1299 RTS Game Project
  • Blitzbat's Blog
  • gordonramp's Blog
  • Andy Gilbert's Blog
  • Marcus' Blog
  • JornAggror Blog
  • diedir's Blog
  • wayneg's Blog
  • Masterxilo's Blog
  • Dave Lee's Blog
  • peubuy's blog
  • OD Arts -Leadwerks Blog
  • The progression......
  • Ultra Software Company Blog
  • The Progression
  • Pancake's Blog
  • Test Blog
  • BLaBZ Blog
  • Pure³d's Blog
  • dreamhead Blog
  • RVL's Blog
  • DB's Blog
  • Toxin Games Development Blog
  • CombatHelo Blog (RSS Import)
  • Foolish's Blog
  • ZioRed's Corner
  • Toxin Games Twitter
  • Shard - Third Initiative
  • Shard's Blog
  • Soamp's Blog
  • Soamp's Blog
  • Laurens' Blog
  • JT`s warehouse district
  • Kennar's Blog
  • KiteFuchs' Blog
  • KiteFuchs' Blog
  • Rachel's Dev-Blog
  • Eagle's Blog
  • zaphos' Blog
  • please delete this blog
  • Afke's Blog
  • Richard Simpson
  • knowledgegranted's Blog
  • EdzUp(GD)'s Blog
  • aGameLife's Kelasel MMORPG Blog
  • tournamentdan's Blog
  • Beyond Civilization Blog
  • smashthewindow
  • AnniXa's Blog
  • AnniXa's Blog
  • Elemental Development
  • DigitalHax Blog
  • Aria's Blog
  • Strogg76's Blog
  • Clackdor's Blog
  • Leadwerks Project Status
  • simpleprogrammer's Blog
  • Pathfinding in LE.2.x
  • Naughty Alien's Blog
  • smashthewindow's Blog
  • Ali Salehi's Blog
  • Jardar's Blog
  • Chris Vossen's Development Blog
  • Scarlet Thread Studios' Blog
  • Kronos' Blog
  • Benton's Blog
  • ChrisV's Blog
  • tjheldna's Blog
  • shadmar's Blog
  • 3D Masons, LLC
  • Andy Gilbert's Enviro Models
  • ParaToxic's Blog
  • NarkLord's Blog
  • ChrisMAN's Blog
  • ChrisMAN's Blog
  • CGMan's Blog
  • The Game
  • Chris Tutorials
  • Leadwerks 3 Experience
  • An Alien Saga
  • klepto2 & Leadwerks 3
  • Inside the mind of eternal insomniac
  • josk's Blog
  • Shader Development in Leadwerks 3.1
  • 3D Coat : Column game making of
  • Einlander's Blog
  • Ginger George's Blog
  • I have a problem
  • Michael_J's Blog
  • nasamydifol's Blog
  • Digman's Blog
  • noesisGUI
  • SavageDogg38's Blog
  • Built from Ruins
  • Remaining Days
  • test_external_blog
  • The Hunt For Food Blog
  • Crazy Minnow Studio
  • CrazyMinnowStudio
  • Guppy's Blog
  • Playing Online
  • Evayr's Blog
  • DerRidda's Blog
  • Karl's Blog
  • whiterabbit's Blog
  • Tinyboss Games
  • abendkleider's Blog
  • sacguccireplica's Blog
  • Arena
  • Imchasinyou's Blog
  • xtom's Blog
  • Lua is better than you think.
  • mdgunn's Blog
  • Crime Closer
  • lxFirebal69xl's Blog
  • Wedmer's Blog
  • Lockdown, going forward.
  • Pump-Action Captain
  • Igor's Blog
  • Dead Anyway
  • Runenrise and more
  • reepblue's Blog
  • Slippy's Corner
  • LUA Musings
  • severjack's Blog
  • mikeporter's Blog
  • miko93's Blog
  • Megalocerous' Blog
  • lxFirebal69xl's Blog
  • aiaf's Blog
  • Lostghbear's Blog
  • echo $BLOG_NAME > blog_title.tmpl
  • johnadam111's Blog
  • Dwarf Beard
  • burgelkat's Blog
  • Charrua's Blog
  • peterpaul's Blog
  • joshmathews' Blog
  • Martin Kearl's Blog
  • Brutile's blog
  • tipforeveryone's Blog
  • Glushchenko Blog
  • Express Lab Games Blog
  • Blueapples' Blog
  • DooMAGE's Blog
  • Structura devblog
  • UltraEngine - Experiences, add-ons and other Stuff
  • martyj's Blog
  • Dragonfreak's Blog
  • Brutile's Blog
  • assigmenthelp
  • Case Study Assignment Help
  • How to deal with bad grade ?
  • How to deal with bad grade ?
  • GameDev Blog
  • devcjohnson's Blog
  • devcjohnson's Blog
  • THE WHAT? Blog
  • The Demurian Scribe
  • GUI Editor
  • GUI Tutorial
  • noob_shaders
  • The Seventh World
  • Phodex Games Blog
  • Leadwerks VS Source 2
  • Work in Progress - Scifi PBR Media
  • [C++] First Player game start
  • The Blog of Yue
  • Snowboarding Development Blog
  • Ocean: Rendering in Leadwerks 4
  • Game Ready Maps
  • Ultra App Kit (Advanced Custom Widgets)
  • Poking around
  • Blender tutorials
  • Usefull Scripts & Components
  • Thirsty Panther
  • Ultimate Action Game Controller

Forums

  • Software
    • General Discussion
    • Programming
    • Game Artwork
    • Showcase
    • Suggestion Box
    • Bug Reports
  • Addons
    • Extensions & Plugins
    • Components
    • Addon Development
  • Platforms
    • Windows
    • Linux
    • macOS

Categories

  • Streams and Events
  • Tutorials
  • Games
  • Work in Progress

Categories

  • Components
  • Effects
  • Extensions
  • Materials
    • Asphalt
    • Brick
    • Concrete
    • Effects
    • Fabric
    • Ground
    • Marble
    • Metal
    • Organic
    • Plaster
    • Rock
    • Roof
    • Sand
    • Snow
    • Surface Imperfections
    • Tile
    • Wood
  • Models
    • Animals & Creatures
    • Architecture
    • Food
    • Machinery
    • Plants and Vegetation
    • Props
    • Vehicles
  • Scenes
  • Skyboxes
  • Tools

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Location

  1. I really think Leadwerks doors hate me. During the past couple of years I've been on and off learning Leadwerks, but nothing has caused more furstration than doors! Feels like every time I try to add a simple door to test map, it means trouble. It all began with my very first steps in Leadwerks, for some reason I was not able to create working door even with prefab. I asked my first questions here back then. Well, I moved to other stuff and learned a lot, then second time came back to doors, still no luck! So I went to look for some other door script other than the stock one, found working one and took that as a base for my doors and it worked perfectly. Moved to other stuff, learned more. Now I needed to test some stuff with doors, and it's been a while... and AGAIN, they refuse to work, they stutter and shake. So I reverted back to stock script, merged my own additions to doors to that script and it works, AGAIN... for how long, we don't know... Ps. This was just a rant, doors work now for me, but I can't believe I'm the only one with this much door problems! I've learned so much, done much more complex things by now, but still... doors. DOORS!
  2. Hey guys, Besides the YouTube videos from the Leadwerks Channel, anyone know of some good LUA tutorials for Leadwerks? Any help appreciated! Thanks
  3. [I had text here but in the edit it dissapeared ] I found that there can only be one instance of the EventQueue. This meant that all the widget events need to be handled in a single location leading to possible complications in code and lowering the possibility to dynamic things. This script allows the developer to subscribe to an eventqueue manager and get their event safely, without usurping all gui controls. The script will automatically create an EventQueueManager variable that all other scripts can expect. To use it from a script not attached to an entity use: EventQueueManager:AddListener(Update) -- a simple function On a script attached to an entity or a lua based class use: EventQueueManager:AddListener(serverbrowser.Update) -- convert : into . Place the script into a file at: Scripts/Functions/eventqueuemanager.lua
  4. I discovered that there can only be one eventqueue in leadwerks. I wanted local eventqueue instances, so I created a lua based version of EventQueue called EventQueueEx It is initialized as such: MyQueue = EventQueueEx:Create() It is used EXACTLY the same as the Leadwerks version.
  5. Welcome to the Sixth Monthly Script Challenge Each Month I will set a challenge for gifted Leadwerkers to solve. Once you have perfected your script post your map to this thread. At the end of the month I will go through all the entries and judge the winner. I will then place the winning map on the Workshop so others can learn from them. Rules. Entries must be your own work. Entries must be submitted before the end of the month ( June ). Any assets you use must be your own or Royalty free. The map that you submit can be used by others for commercial use. Have fun. June Challenge After asking for suggestions from the Leadwerks community . I've decided to use Slastraf idea of Flying Enemies. The enemy could be like a dragon that circles and swoops on the player to attack them causing damage. Or perhaps it could be a drone like enemy that tracks the player and shoots them as it gets within range. How you implement your script is up to you. Remember the winning script should not only solve the problem but should also have comprehensive comments within the script so that new users can learn from your script. Prize Damien Defranco and his company Vixeemo are now the proud sponsors of the Leadwerks community monthly script challenge. Vixeemo (http://vixeemo.com) is an all-in-one business solutions brand for your start-up or project needs. The winner will receive a free web & graphic design package provided by Vixeemo that includes a 3-page professional website design (Home, About, Contact), logo design and integration, banner/slider design, a blog section, and an additional gallery page to showcase images/video or projects. Vixeemo will work with the winner to fully customize everything to bring the vision to fruition. This prize is perfect for any Leadwerks user who wants to get their project or brand onto the internet. The winner will need to provide the domain ( TomsHardware Guide ), and Vixeemo will do the rest. This design package is valued at over $400 USD. This is a great reward for your hard work and a great way to give your game project that professional look to make it stand out from the crowd. If you have any ideas or thoughts on the Challenge please feel free to comment. I'm looking forward to your submissions. PS Josh could you kindly pin this thread please.
  6. I've been doing some coding on a bunch of Left 4 Dead style stuff and this is the latest script I have. A simple use timer. I haven't tested it very hard, but there should not be any glaring bugs. Information about the script: http://i.imgur.com/ZuzDtap.gifv --[[ Title: Use Timer Author: Einlander Start Date: 5-22-17 Version: 2 Description: A simple Left 4 Dead style use timer Notes: WHAT IT DOES: Allows player to use a script to force player/user to use an item for a set period of time. Think Left 4 Dead when you need to pour gas or start generators. WHAT IT DOESENT DO: It does not immobilize the player/user. It does not cancel when the player/user looks away or is too far. Changelog: 1 -Initial release 2 -style changes small fix added self.entity:SetKeyValue("type","use_timer") . This will help when trying to figure out what you are using and adjust accordingly. ie:detect you are using the use timer and make it so the player cant move -in Script:Start changed self.completed to true to prevent activating when not targeting entity. 3 -complete rewrite with less code, and smarter time management ]] The script itself: -- edit -- added self.entity:SetKeyValue("type","use_timer") . This will help when trying to figure out what you are using and adjust accordingly. ie:detect you are using the use timer and make it so the player cant move. in Script:Start changed self.completed to true to prevent activating when not targeting entity. -- edit --
  7. It would be nice to be able to dock the script editor within the main editor.
  8. Hello, I have a muzzle pivot and the Projectile script attached to it. self.muzzle.script.enabled = true When I call this while clicking the Mouse, the game crashes without warning. I dont know how to use the Projectile script, is it intentionally a prefab ?
  9. Hey guys, Been playing around with leadwerks lately testing random levels, trying to learn the software. However one thing I came across is the fact that for some reason I cannot fire my weapon (unless I am holding the ctrl key) when I am moving my character around with the WASD keys. I made sure it was reloaded too. I tried looking at the FPS controller script, however I do not know where I can find the specific code that seems to call for the ctrl key being depressed in order to fire my gun while moving. I want to be able to strafe around and fire my weapon at the same time without it being clunky. If I click my mouse while holding a weapon in a stationary position, the weapon fires like normal. Can someone point me in the right direction as far as scripting? I am only just starting to wrap my head around LUA in leadwerks. Thanks in advance.
  10. CorzaX24

    Shaders

    Hey guys, Yet another issue I'm faced with, and is probably real simple to accomplish but I can't seem to understand how to do it. How do I add a Post-Processing shader to my work? Not a single model, but to the entire level? Thanks in advance!
  11. CorzaX24

    Water

    Hi there, I have been able to add water into my work using a downloaded water material from the workshop, which also comes with a CheapWater.lua script. It works fine but, oddly enough, looks "cheap". My question is, is there something else out there looks somewhat nicer or more realistic? I havent been able to find anything. Not to mention, I can walk across it and not actually go under/into the water... Thanks
  12. If I sometimes work at line 494 in my script and want to create a new variable, i need to scroll to the top and then make a new one , then try to find the line 494 again, remember what I actually called the value (sometimes need to scroll up again ,ha) . I think one will know what I mean. What would be good Is a tool at the side of the script editor where you it generates values by selecting the data type, what its called and so on. Just a smaller change that I would add to all the changes that we await for the script editor.
  13. hi everyone ! I would suggest that added commands to C ++, I would can add scripts LUA in an entity whatever I define for a command, example> I created a simple box, I can link a script LUA in the box with a command like ( entity:loadScript (EntityID, "LUASCRIPTPATH") or something like this ..... and also like that added commands to connect to a server (TCP or UDP) and receive messages > string, integer and float and too send messages > string , integer and float.... would be very useful ! thanks by attention
  14. SpEcIeS

    MonsterAI

    This morning I started up a fresh "Advanced First-Person Shooter" project. After the "07-AI and Events.map" was loaded and then ran, immediately an error was generated: Script Error error in function 'SetCollisionType'. argument #3 is 'boolean'; '[no object]' expected. Line 90 Is anyone else producing this error?
  15. For my current project I wanted to simulate a light that's shorting out in order to add a bit of a creepy ambience to my scene. After a while of messing with the different things that could be done with an emitter (and failing at getting the effect I wanted), I realized that really, a light that's shorting out is really a light that's turning off and on again. Well, that's something that can be scripted pretty easily thanks to Leadwerk's API. There are a couple of obvious ways to get the desired effect: Create the light in a given position, then remove it again. This can be a pain and can also be resource intensive Toggle the light's color between the "on" and "off" colors, where "off" is transparent and "on" is any color with a visible alpha. Needless to say, I chose the latter. First I needed to define some colors. For my purposes, I wanted to be able to set colors between Red, Green, Blue, and White, so in my Scripts/Objects/Lights/ShortedBlink.lua file I added the following: function Script:Start() self.colors = {} self.colors["red"] = Vec4(1, 0, 0, 0) self.colors["green"] = Vec4(0, 1, 0, 0) self.colors["blue"] = Vec4(0, 0, 1, 0) self.colors["white"] = Vec4(1, 1, 1, 0) if self.color_on == nil then self.color_on = self.colors[string.lower(self.OnColor)] end self:On() end Then it came time to fill in the "on()" and "off()" functions: function Script:On() self.entity:SetColor(self.color_on) self.component:CallOutputs("On") self.isOn = true end function Script:Off() self.entity:SetColor(self.color_off) self.component:CallOutputs("Off") self.isOn = false end I then defined a few top-level variables that I knew I would need, one of which needed to be available to the Leadwerks Editor, namely "OnColor" (the desired activated color). Here's what the top of the file looks like: Script.enabled = true Script.isOn = true Script.OnColor = "red" -- string "Active Color" Script.color_on = nil -- transparent Script.color_off = Vec4(0, 0, 0, 0) Now that I had my top-level variables defined coupled with on and off functions, it was time to add a ToggleLight() function that would do the work: function Script:ToggleLight() if self.isOn then self:Off() else self:On() end end Pretty self-explanatory. If isOn is true then the light is on, so turn it off, else turn it on. This script is missing one thing: UpdateWorld() function Script:UpdateWorld() self:ToggleLight() end I was pretty happy with myself up until I attached this script to a spotlight and almost suffered an epileptic seizure... Thankfully, the answer was pretty clear: I needed to add some sort of a delay. After some experimentation, the desired effect was achieved by performing some modulo division: function Script:UpdateWorld() if Time:Millisecs() % 11 == 0 then self:ToggleLight() end end Basically, we're taking the current time in milliseconds and seeing if it's evenly divisible by 11. If it is, then toggle the light, else leave the light's state alone. I probably could have gone with a better way of randomizing the delay, but this one works just fine and isn't resource intensive at all (if a computer struggles to perform a simple math operation, put it out of its misery). The completed script looks like this: Script.enabled = true Script.isOn = true Script.OnColor = "red" -- string "Active Color" Script.color_on = nil -- transparent Script.color_off = Vec4(0, 0, 0, 0) function Script:Start() self.colors = {} self.colors["red"] = Vec4(1, 0, 0, 0) self.colors["green"] = Vec4(0, 1, 0, 0) self.colors["blue"] = Vec4(0, 0, 1, 0) self.colors["white"] = Vec4(1, 1, 1, 0) if self.color_on == nil then self.color_on = self.colors[string.lower(self.OnColor)] end self:On() end function Script:On() self.entity:SetColor(self.color_on) self.component:CallOutputs("On") self.isOn = true end function Script:Off() self.entity:SetColor(self.color_off) self.component:CallOutputs("Off") self.isOn = false end function Script:ToggleLight() if self.isOn then self:Off() else self:On() end end function Script:UpdateWorld() if Time:Millisecs() % 11 == 0 then self:ToggleLight() end end Just add the script to a light source, type in the color you want (from the choices available within the script) and watch what happens the next time you debug or play your game. Hopefully this saves someone some time in the future.
  16. Hi there, having to trouble with my Scripts. I'm using an Spawn Script for Zombies. This works finde in Editor Mode and Debug. No Problems so far. After Publishing the Game. On first spawn i get following Error Message: Error: Failed to read file "C:/Users/Marco/Desktop/ZombieZ-Starter/GameStarter/G ameStarter/bin/Debug/Data/Horde/offshore/AddOns/Zombie Character Pack/zombie1.pfb". Error: Failed to load prefab "C:/Users/Marco/Desktop/ZombieZ-Starter/GameStarter /GameStarter/bin/Debug/Data/Horde/offshore/AddOns/Zombie Character Pack/zombie1.pfb". Lua Error: [string "C:/Users/Marco/Desktop/ZombieZ-Starter/GameStarter/GameStart er/bin/Debug/Data/Horde/offshore/scripts/gamecontroller.lua"]:99: attempt to index local 'zombie' (a nil value) I guess the problem is that the script wants to load the file from this path: C:/Users/Marco/Desktop/ZombieZ-Starter/GameStarter /GameStarter/bin/Debug/Data/Horde/offshore/AddOns/Zombie Character Pack/zombie1.pfb This can not work, because all of the Game Data is zipped in the Data directory. Any idea how to fix this issue?
  17. Hello Leadwerks community, This is my first post and I was wondering if anyone out there is able to help me create a simple script. As the title states, I just want to get a simple script, like the FPS controller one, however, just for walking around. Thanks.
  18. I'm trying to create a script that spawns an object every so often at a set time, but I keep getting a script error that says " '=' expected near 'function'". I'm new to programming and have no clue what that means. here's a screenshot of it in context. ANy help would be very appreciated. Script.spawnObject = "" --entity "Object" Script.spawnTimer = 1.5 --float "Spawn timer" Script.timer function Script:UpdateWorld() self.timer = self.timer + (Time:GetSpeed()/100) if(self.timer > self.spawnTimer) then local newObject = self.spawnObject:Instance() newObject:SetPosition(self.entity:GetPosition()) self.timer = 0 end end
  19. I'm trying to get Barrels to fall from a certain point every 1.5 seconds. I have the spawn point in for it and everything. When I click "Run", the barrel is in the sky where it should be falling from but it doesn't fall, and no more spawn in. How do i get it to spawn in every 1.5 seconds and fall down? The script I have for it: 1.)Script.spawnObject = "" --entity "Spawn object" 2.)Script.spawnTime = 1.5 --float "Spawn time" 3.)local timer = 0 4.) 5.)function Script:UpdateWorld() 6.) timer = timer + (Time:GetSpeed()/100) 7.) if(timer > self.spawnTime) then 8.) local newObject = self.spawnObject:Instance() 9.) newObject:SetPosition(self.entity:GetPosition()) 10.) timer = 0 11.) end 12.) 12.)end Also, I do have the Barrel set as the spawn object for the spawning point, and the script is attached to it, as well. Edit: I forgot to mention. I'm using Lua
  20. Can someone send me or post a .lua script for the FPSCharacter controller that allows me to crouch? Thanks.
  21. I've run into a situation which seems to be counterintuitive. When I run the following code local entity = self.entity:Copy() end try to access entity's properties that get set in Script:Start() directly afterwards and via entity.script.prop, they are all nil, that is, they don't exist at all. What is more, Script:Start() does not get called at all, even after the tick/frame in question and before the Script:Update() of the next tick/frame. On the contrary, if I run the same code with a line added local entity = self.entity:Copy() entity.script.Start(entity.script) -- here I call manually Script:Start() of the entity everything works as expected. So, shouldn't this behavior be built into LE? I mean, everyone expects that an initialization script runs on entity creation (instancing / copying).
  22. This script will crash the editor (EXCEPTION_ACCESS_VIOLATION) if attached to a pivot and dragged into the Flowgraph. TriggerDelayMapLoad.lua
  23. Hey guys, great product, i love it! I have a few suggestions about the script editor: - Having a shortcut key to open it. - Prevent from closing window when pressing the ESC key. - Automatically re-open last lua files.
  24. Something weird is happening. I have two objects with the scame script on them. Here is the code: Script.enabled=0 --bool "enabled" Script.int=0 Script.tab={1} function Script:UpdateWorld() System:Print("------------starts "..self.entity:GetKeyValue("name")) System:Print("int="..self.int) System:Print("#="..#self.tab) System:Print("[#]="..self.tab[#self.tab]) if not self.enabled then return end self.int=self.int+1 self.tab[#self.tab+1]=math.random(1,9) System:Print("-----------END "..self.entity:GetKeyValue("name")) end It has boolean variable which is set to true for one entity and to false for another entity in the editor. it also has one number variable (int) and one table (tab). Script with "enabled" entity ads +1 to int variable and one extra table element with random value each update. And here is what I get in output: ------------starts Pivot 1 (enabled) int=0 #=1 [#]=1 -----------END Pivot 1 (enabled) ------------starts Pivot 2 (disabled) int=0 #=2 [#]=4 ------------starts Pivot 1 (enabled) int=1 #=2 [#]=4 -----------END Pivot 1 (enabled) ------------starts Pivot 2 (disabled) int=0 #=3 [#]=8 ------------starts Pivot 1 (enabled) int=2 #=3 [#]=8 -----------END Pivot 1 (enabled) ------------starts Pivot 2 (disabled) int=0 #=4 [#]=7 ------------starts Pivot 1 (enabled) int=3 #=4 [#]=7 -----------END Pivot 1 (enabled) ------------starts Pivot 2 (disabled) int=0 #=5 [#]=9 ... (Added space after each update for easier reading) As you can see int variable increases in "enabled" entity and doesn't change in "disabled". Also disabled entity doesn't print last ("---END") line, so it is really disabled. But for some reason the table changes for both of those entities. It has same amount of elements and the last element is the same (it was generated randomly) for both scripts. Can you please explain me what is going on here?
  25. I just noticed a really annoying glitch where if I put a entity with a script, the script gets deleted after I click something else, it's happening everywhere, and it dind't happen before. I started using the beta build to see if it would be fixed there to no avail.
×
×
  • Create New...