Syntax question, multiple nouns

Have a spell system of sorts. “Summoning” weather effects on things. I lack syntax understanding. My code:

A WeatherEffect is a kind of thing. Lightning is a WeatherEffect. Wind Storm is a WeatherEffect. A WeatherEffect is always proper-named. 

Summoning it on is an action applying to two visible things.

Understand "summon [any WeatherEffect] on/at [something]" as summoning it on.
Understand "[any WeatherEffect] [something]" as summoning it on.

OkWeather is a kind of thing. Office_PowerLines is OkWeather.

Instead of summoning:
	if the player is not Kevin:
		say "[italic type]That is a magical ability you do not currently possess. Type 'verbs' to see what's available to you.[roman type]";
	otherwise if the player is Kevin and the first noun is "Lightning" and the second noun is not OkWeather:
		say "'A lightning strike would not be appropriate here and now,' you think.".

The point of trouble is the otherwise if the player is Kevin and the first noun is "Lightning" and the second noun is not OkWeather:. The engine is having trouble with the first noun and ‘Lightning’ bit. What’s the proper way for writing that?

1 Like

Instead of ‘first noun’, you should probably just say ‘the noun is …’ The parser understands ‘noun’ as being the thing immediately after the action name. With Lightning being a WeatherEffect, it’s a thing, not a snippet (which would be indicated by quotes)–therefore you should be able to just say –

otherwise if the player is Kevin and the noun is Lightning...
3 Likes

Easy peasy. Thank you very much!

1 Like

Not a problem. If you need further help, feel free to post more. You’ll find that making a game is just as much a challenge as, if not more than, playing a game. But it’s a challenge I heartily recommend! And I’d say it’s more fun making one than playing one!

1 Like