![]() |
|
Problems with an emitter - Printable Version +- Team Spartan Cookies & Milk Forums (https://teamscm.co.uk) +-- Forum: Garry's Mod (https://teamscm.co.uk/forum-4.html) +--- Forum: Starfall (https://teamscm.co.uk/forum-7.html) +--- Thread: Problems with an emitter (/thread-872.html) Pages:
1
2
|
RE: Problems with an emitter - LocInt - 21-04-2015 (21-04-2015, 02:51 PM)Destinys Player Wrote: ...aaaaand the code you've given me doesn't work. Doesn't even show the render for a moment. In fact, it appears like it doesn't run on the server at all, i.e. there's no instances when I check it with the profiler, and I really have no idea why it doesn't work. How about you show the decent code. I see a lot of suggestions but I would love to see how you added these lines to your code. RE: Problems with an emitter - Person8880 - 21-04-2015 (21-04-2015, 02:42 PM)T-16 Wrote: same, I should've looked at your code and tried to help him get that working.DTVars are the best choice for values you need to be always available to the client. They do 3 things that make them the best choice in this case:
The times you shouldn't use them, is if you want to invoke an action on the client. Then you need to use a network message so you can run the action on the client when you get the network message. (21-04-2015, 02:51 PM)Destinys Player Wrote: ...aaaaand the code you've given me doesn't work. Doesn't even show the render for a moment. In fact, it appears like it doesn't run on the server at all, i.e. there's no instances when I check it with the profiler, and I really have no idea why it doesn't work.The code I posted on its own definitely works, I made sure of that before posting. Sounds like you might have lost the --@sharedscreen annotation at the top? Could you check that and post back. RE: Problems with an emitter - Destiny's Player - 21-04-2015 Yep, somehow I've managed to loose the --@sharedscreen annotation. Dunno how, but now it works. And still, I still don't really understand how do DTVars work. When I try to use them in my code, they always return nil.
This, for example. I'm sure that I'm messing something up, but what? I don't know. My theory is that DTVar's are not compatible with Tables, but I'm not sure.
RE: Problems with an emitter - Person8880 - 21-04-2015 There's no table type. DTVars only types are "Angle", "Bool", "Entity", "Float", "Int", "String" and "Vector". DT = Data Table, i.e it's already a table. RE: Problems with an emitter - Destiny's Player - 21-04-2015 Thank you for your help! I hope that I'll slightly slow down with the noobyng from now on, as I think that I've finally gotten the basics of Starfall and this kinda thing... RE: Problems with an emitter - Iajret - 21-04-2015 With "chip" parameter in DTVar I can send values to another SF chip? Or how it works? RE: Problems with an emitter - LocInt - 22-04-2015 (21-04-2015, 09:41 PM)Iajret Wrote: With "chip" parameter in DTVar I can send values to another SF chip? Or how it works? Actually you send values to another SF chip by Code: if (net.start(Screen)) thenScreen is the screen entity. Note: this work only between your own chips. RE: Problems with an emitter - Person8880 - 22-04-2015 (21-04-2015, 09:41 PM)Iajret Wrote: With "chip" parameter in DTVar I can send values to another SF chip? Or how it works?The chip parameter lets you pass in another Starfall entity that you own to get/set DTVars for. Basically,
is the same as:
so you can put whatever Starfall entity you own instead of ents.self() and it'll get/set for that.
|