Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Trigger Cave In
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#8
RE: Trigger Cave In

There's a difference between a constructor and a function call. You use a function call to call a function using its constructor, but they are different.

This is a function. The first line is called the constructor of that function.
PHP Code: (Select All)
void Function(int parameter
{


This is a function call. You use it to call the function above within some other function, like OnStart().
PHP Code: (Select All)
Function(1); 

The constructor tells the code which parameters it wants, and the call must then satisfy those parameters. So "int parameter" changes into '1' in the call because int is a numerical variable. If it had said (string parameter), then you'd need to input Function("SomeText"); instead.

So to put this into your situation. This is the constructor:
PHP Code: (Select All)
void CreateParticleSystemAtEntity(stringasPSNamestringasPSFilestringasEntitybool abSavePS); 

And so you must call this function using something that satisfies the parameters it asks for. Like so:
PHP Code: (Select All)
CreateParticleSystemAtEntity("rocksmoke2""ps_impact_dust_high.ps""rocksmoke_2"false); 

That line can be called within your existing script to create this particle system.

Hope you understand this. To anyone else, if anything I said is incorrect, please tell me.

(This post was last modified: 06-07-2016, 11:10 PM by Mudbill.)
06-07-2016, 10:58 PM
Find


Messages In This Thread
Trigger Cave In - by Xallikk - 06-06-2016, 05:29 AM
RE: Trigger Cave In - by Romulator - 06-06-2016, 06:16 AM
RE: Trigger Cave In - by Mudbill - 06-06-2016, 08:08 AM
RE: Trigger Cave In - by Romulator - 06-06-2016, 05:02 PM
RE: Trigger Cave In - by Xallikk - 06-07-2016, 04:21 AM
RE: Trigger Cave In - by Romulator - 06-07-2016, 08:06 AM
RE: Trigger Cave In - by Xallikk - 06-07-2016, 09:40 PM
RE: Trigger Cave In - by Mudbill - 06-07-2016, 10:58 PM
RE: Trigger Cave In - by Xallikk - 06-09-2016, 02:34 AM
RE: Trigger Cave In - by Romulator - 06-09-2016, 07:14 AM
RE: Trigger Cave In - by Mudbill - 06-09-2016, 07:41 AM
RE: Trigger Cave In - by Xallikk - 06-09-2016, 06:17 PM
RE: Trigger Cave In - by Mudbill - 06-10-2016, 02:58 PM
RE: Trigger Cave In - by Xallikk - 06-11-2016, 02:00 AM
RE: Trigger Cave In - by Mudbill - 06-12-2016, 05:45 AM
RE: Trigger Cave In - by Xallikk - 06-12-2016, 06:29 AM
RE: Trigger Cave In - by Xallikk - 06-12-2016, 09:48 PM
RE: Trigger Cave In - by Mudbill - 06-12-2016, 10:50 PM
RE: Trigger Cave In - by Xallikk - 06-12-2016, 10:55 PM
RE: Trigger Cave In - by Mudbill - 06-13-2016, 03:14 AM
RE: Trigger Cave In - by Xallikk - 06-13-2016, 03:18 AM
RE: Trigger Cave In - by Daemian - 06-13-2016, 11:25 PM
RE: Trigger Cave In - by Mudbill - 06-14-2016, 12:35 AM
RE: Trigger Cave In - by Xallikk - 06-14-2016, 02:18 AM



Users browsing this thread: 1 Guest(s)