This is the thread where you ask questions regarding code you are making. It can be from errors that you can't solve in your code or asking about system values. Make sure when responding to a question, you quote the person you're helping that way people know who are being helped.
| ||
Glitch with the .Ysp and .Xsp for NPCs and playersI've noticed that when I put either of these six lines of code in a script:
Code: Select all NPC(sysval(param1)).Xsp=0It doesn't work perfectly, the NPCs still move a bit downwards if they're in the air and the players are still able to move (with reduced speed though). | ||
I think in order to make an npc levitate and not fall you have to put like ~ .3 in the Yspeed. If you want the players to stop moving, Go to Events -> Others -> Player Controls and lock the controls from there. Remember that Xsp=0 Ysp=0 does not override the current speed, instead it adds to the current speed. | ||
Making a thrown NPC kill NPCs it comes into contact with other NPCsI'm trying to make a custom power-up but the NPC that Mario throws doesn't kill NPCs it hits...
| ||
I'm using the NPC Mario throws with the Hammer Suit. The script only affects the NPC's movement, it's moving fine but has no collision at all. | ||
What is the code exactly? | ||
With npc(sysval(Param1)) .Ysp = 0 NKill(-1,1,1,16,8,0,1,1) End with It moved fine with just the .Ysp = 0, but since it wasn't hurting anything I added the only thing I could find on killing... also, for the 2nd and 3rd values I tried using .X and .Y but it got an error, same with the current one. I can't figure out some stuff in this help file... | ||
That is weird, what are the exact modifications you want to do with the hammer, since it automatically kills enemies by default. | ||
Just it's movement. It also doesn't collide with blocks even with npc texts. | ||
Thanks! | ||
That's not my problem... | ||
It's moving exactly how I want it to, nut it's not hitting anything. It's supposed to move forward and kill enemies, but all it's doing is moving forward. | ||
Changing Global variables to that of a Local variable?Here's the code I'm using...
If val(CurrentHighScore) > gval(HighScore) then gval(HighScore) = val(CurrentHighScore) End If Seems like that would work but it doesn't change the high score global variable at all. Please help! | ||
I recreated what you said in this test level.
Code: Select all if val(HighScore) < val(Score) thenDid you make an event that runs the script whenever your minigame si finished?
| ||
Yes, my problem is that [yes, yours works] it doesn't seem to work with global variables. I need to set the value of an in level variable to that of a global variable so that it saves and crosses over to other levels.
Sorry for late response. | ||
someone can help me with these scripts to the ground pound koopa
Code: Select all With npc(sysval(Param1)) | ||
LSpin angular speed measurement unit?What is the measurement unit for the angular speed in LSpin(layerName, cx, cy, angularSpeed)?
Example, radians/sec | ||
How do I make the scripted npc to spawn these npcs but they are not in Spawned NPCs Layers?
| ||
Who is online (over the past 5 minutes)Users browsing this forum: 1 guest | ||