xetra11 Posted July 11, 2016 Share Posted July 11, 2016 I'm going through the Coin Collector Tutorial Project and it went pretty fluent until some issue I come over now.The tutorial tells me to add the following code within the collision callback to spawn an emitter-nodeCoins.cs:function Coin::onCollision(%this, %obj, %col, %vec, %len){ %emitterNode = new ParticleEmitterNode(){ datablock = CoinNode; emitter = CoinEmitter; position = %obj.getPosition(); }; %obj.delete(); $CoinsFound++; if(Coins.getCount() <= 0) { commandToClient(%col.client,'ShowVictory',$CoinsF[/code]ound); } } CoinDataBlock.cs: datablock ParticleData(CoinParticle : DefaultParticle){ lifetimeMS = 1000; gravityCoefficient = 0; dragCoefficient = "2"; sizes[0] = 1; sizes[1] = 1; sizes[2] = 1; sizes[3] = 1; inheritedVelFactor = "0"; }; datablock ParticleEmitterData(CoinEmitter : DefaultEmitter){ particles = CoinParticle; ejectionPeriodMS = "10"; ejectionVelocity = "4.167"; ejectionOffset = "0.625"; thetaMax = "360"; softnessDistance = "1"; lifetimeMS = "200"; }; datablock ParticleEmitterNodeData(CoinNode : DefaultEmitterNodeData){ timeMultiple = 1.0; }; Following error occurs now when I run into a "Coin": GameBase::setDatablockProperty - Could not find data block "CoinNode" Does anyone know what typo or semantically wrong situation I have here?Thanks in advance! Quote Link to comment Share on other sites More sharing options...
LukasPJ Posted July 11, 2016 Share Posted July 11, 2016 Hello, I hope you're enjoying the tutorial!Did you remember to "exec" the script file that contains the coin datablock? Quote Link to comment Share on other sites More sharing options...
xetra11 Posted July 11, 2016 Author Share Posted July 11, 2016 Heya yea its pretty good! // Common Marker's exec("./markers.cs"); exec("./defaultparticle.cs"); exec("./CoinDatablock.cs"); Here I added the exectionn statement Quote Link to comment Share on other sites More sharing options...
LukasPJ Posted July 11, 2016 Share Posted July 11, 2016 So, if you are running on Linux or Mac, make sure to check for case sensitivity.Hmm, otherwise, try and paste the console.log file to hastebin.com and share it here. Quote Link to comment Share on other sites More sharing options...
xetra11 Posted July 11, 2016 Author Share Posted July 11, 2016 Nah I'm running on Windownshasebin: http://hastebin.com/imapitilaq.vhdl Quote Link to comment Share on other sites More sharing options...
LukasPJ Posted July 11, 2016 Share Posted July 11, 2016 So at the top there, I found:ParticleEmitterData - CoinEmitter(10) - invalid value for thetaMax: Must be between 0 and 180core/art/datablocks/CoinDatablock.cs (0): Unable to find parent object DefaultEmitterNodeData for ParticleEmitterNodeData.Which means that, since you set thetaMax to "360" and that failed, the creation of the whole datablock failed, try setting it to "180". :DEdit:I can see it is a big in the tutorial, my bad! Quote Link to comment Share on other sites More sharing options...
xetra11 Posted July 11, 2016 Author Share Posted July 11, 2016 I changed that to 180 as I read the log by myself - I really need to read logs more frequently ^^But I cannot fix that bug:core/art/datablocks/CoinDatablock.cs (0): Unable to find parent object DefaultEmitterNodeData for ParticleEmitterNodeData.Because its what the tutorial tells me - I don't know what to replace it with then, even autocomplete in torsion tell me to use DefaultEmitterNodeData Quote Link to comment Share on other sites More sharing options...
LukasPJ Posted July 11, 2016 Share Posted July 11, 2016 Ohhh right, some templates don't have that datablock, because it is sort of redundant. You can either leave out the ": DefaultParticleEmitterNodeData" part, or define it somewhere, it shouldn't change the outcome! I have to clear that up in the tutorial. Quote Link to comment Share on other sites More sharing options...
xetra11 Posted July 11, 2016 Author Share Posted July 11, 2016 Ok thanks for the help.Hope I could help out to strengthen the tutorial that way ;) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.